summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgkostka <kostka.grzegorz@gmail.com>2015-12-09 13:14:27 +0100
committergkostka <kostka.grzegorz@gmail.com>2015-12-09 13:14:27 +0100
commit7bcabb0be2c844dfb172c1237757f444a8820216 (patch)
tree3136a5061e424fc377e1811e84b8cfb194ef9d37
parent183e464de184a73d18ca6d8833f87f8e86471b07 (diff)
ext4_debug: add DEBUG_NOPREFIX flag for debug printf
-rw-r--r--lwext4/ext4_config.h6
-rw-r--r--lwext4/ext4_debug.h5
2 files changed, 3 insertions, 8 deletions
diff --git a/lwext4/ext4_config.h b/lwext4/ext4_config.h
index bbf4f5e..1b25106 100644
--- a/lwext4/ext4_config.h
+++ b/lwext4/ext4_config.h
@@ -98,12 +98,6 @@ extern "C" {
#define CONFIG_DEBUG_PRINTF 1
#endif
-/**@brief Debug printf prefixes*/
-#ifndef CONFIG_DEBUG_PREFIX
-#define CONFIG_DEBUG_PREFIX 1
-#endif
-
-
/**@brief Assert printf enable (stdout)*/
#ifndef CONFIG_DEBUG_ASSERT
#define CONFIG_DEBUG_ASSERT 1
diff --git a/lwext4/ext4_debug.h b/lwext4/ext4_debug.h
index 35d3003..f3f591d 100644
--- a/lwext4/ext4_debug.h
+++ b/lwext4/ext4_debug.h
@@ -80,6 +80,7 @@ extern "C" {
#define DEBUG_JBD (1ul << 16)
#define DEBUG_MBR (1ul << 17)
+#define DEBUG_NOPREFIX (1ul << 31)
#define DEBUG_ALL (0xFFFFFFFF)
static inline const char *ext4_dmask_id2str(uint32_t m)
@@ -145,8 +146,8 @@ uint32_t ext4_dmask_get(void);
/**@brief Debug printf.*/
#define ext4_dbg(m, ...) \
do { \
- if (m & ext4_dmask_get()) { \
- if (CONFIG_DEBUG_PREFIX) { \
+ if ((m) & ext4_dmask_get()) { \
+ if (!((m) & DEBUG_NOPREFIX)) { \
printf("%s", ext4_dmask_id2str(m)); \
printf("l: %d ", __LINE__); \
} \