Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/emubd
diff options
context:
space:
mode:
authorChristopher Haster <chaster@utexas.edu>2019-07-27 04:09:24 +0300
committerChristopher Haster <chaster@utexas.edu>2019-07-27 04:09:24 +0300
commit51fabc672b43a6285bced7e6574989cfc203ebd9 (patch)
tree5861f90e4df3a7ec43ceccb757b4f93cbec36152 /emubd
parent72e3bb44482e417d8a0408ecd16cb7ef96a6c2fc (diff)
Switched to using hex for blocks and ids in debug output
This is a minor quality of life change to help debugging, specifically when debugging test failures. Before, the test framework used hex, while the log output used decimal. This was slightly annoying to convert between. Why not output lengths/offset in hex? I don't have a big reason. I find it easier to reason about lengths in decimal and ids (such as addresses or block numbers) in hex. But this may just be me.
Diffstat (limited to 'emubd')
-rw-r--r--emubd/lfs_emubd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/emubd/lfs_emubd.c b/emubd/lfs_emubd.c
index 943ddfb..2f729fb 100644
--- a/emubd/lfs_emubd.c
+++ b/emubd/lfs_emubd.c
@@ -151,7 +151,7 @@ void lfs_emubd_destroy(const struct lfs_config *cfg) {
int lfs_emubd_read(const struct lfs_config *cfg, lfs_block_t block,
lfs_off_t off, void *buffer, lfs_size_t size) {
- LFS_TRACE("lfs_emubd_read(%p, %"PRIu32", %"PRIu32", %p, %"PRIu32")",
+ LFS_TRACE("lfs_emubd_read(%p, 0x%"PRIx32", %"PRIu32", %p, %"PRIu32")",
(void*)cfg, block, off, buffer, size);
lfs_emubd_t *emu = cfg->context;
uint8_t *data = buffer;
@@ -204,7 +204,7 @@ int lfs_emubd_read(const struct lfs_config *cfg, lfs_block_t block,
int lfs_emubd_prog(const struct lfs_config *cfg, lfs_block_t block,
lfs_off_t off, const void *buffer, lfs_size_t size) {
- LFS_TRACE("lfs_emubd_prog(%p, %"PRIu32", %"PRIu32", %p, %"PRIu32")",
+ LFS_TRACE("lfs_emubd_prog(%p, 0x%"PRIx32", %"PRIu32", %p, %"PRIu32")",
(void*)cfg, block, off, buffer, size);
lfs_emubd_t *emu = cfg->context;
const uint8_t *data = buffer;
@@ -276,7 +276,7 @@ int lfs_emubd_prog(const struct lfs_config *cfg, lfs_block_t block,
}
int lfs_emubd_erase(const struct lfs_config *cfg, lfs_block_t block) {
- LFS_TRACE("lfs_emubd_erase(%p, %"PRIu32")", (void*)cfg, block);
+ LFS_TRACE("lfs_emubd_erase(%p, 0x%"PRIx32")", (void*)cfg, block);
lfs_emubd_t *emu = cfg->context;
// Check if erase is valid