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
diff options
context:
space:
mode:
authorChristopher Haster <chaster@utexas.edu>2019-07-16 23:40:26 +0300
committerChristopher Haster <chaster@utexas.edu>2019-07-16 23:40:26 +0300
commite279c8ff9043ae50b9b34468eced7c199a4a71df (patch)
tree2955f8fd3653c5acff11b262ca20006bf7a3b646
parent6a1ee914904707cb65af5d9a9412cf6139c08b78 (diff)
Tweaked debug output
- Changed "No more free space" to be an error as suggested by davidefer - Tweaked output to be more parsable (no space between lfs and warn)
-rw-r--r--lfs.c2
-rw-r--r--lfs_util.h8
2 files changed, 5 insertions, 5 deletions
diff --git a/lfs.c b/lfs.c
index 4edf6b7..8ce1872 100644
--- a/lfs.c
+++ b/lfs.c
@@ -471,7 +471,7 @@ static int lfs_alloc(lfs_t *lfs, lfs_block_t *block) {
// check if we have looked at all blocks since last ack
if (lfs->free.ack == 0) {
- LFS_WARN("No more free space %"PRIu32,
+ LFS_ERROR("No more free space %"PRIu32,
lfs->free.i + lfs->free.off);
return LFS_ERR_NOSPC;
}
diff --git a/lfs_util.h b/lfs_util.h
index 5e29b61..80fab55 100644
--- a/lfs_util.h
+++ b/lfs_util.h
@@ -51,28 +51,28 @@ extern "C"
// Logging functions
#ifdef LFS_YES_TRACE
#define LFS_TRACE(fmt, ...) \
- printf("lfs trace:%d: " fmt "\n", __LINE__, __VA_ARGS__)
+ printf("lfs_trace:%d: " fmt "\n", __LINE__, __VA_ARGS__)
#else
#define LFS_TRACE(fmt, ...)
#endif
#ifndef LFS_NO_DEBUG
#define LFS_DEBUG(fmt, ...) \
- printf("lfs debug:%d: " fmt "\n", __LINE__, __VA_ARGS__)
+ printf("lfs_debug:%d: " fmt "\n", __LINE__, __VA_ARGS__)
#else
#define LFS_DEBUG(fmt, ...)
#endif
#ifndef LFS_NO_WARN
#define LFS_WARN(fmt, ...) \
- printf("lfs warn:%d: " fmt "\n", __LINE__, __VA_ARGS__)
+ printf("lfs_warn:%d: " fmt "\n", __LINE__, __VA_ARGS__)
#else
#define LFS_WARN(fmt, ...)
#endif
#ifndef LFS_NO_ERROR
#define LFS_ERROR(fmt, ...) \
- printf("lfs error:%d: " fmt "\n", __LINE__, __VA_ARGS__)
+ printf("lfs_error:%d: " fmt "\n", __LINE__, __VA_ARGS__)
#else
#define LFS_ERROR(fmt, ...)
#endif