summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libblkid/src/blkidP.h11
-rwxr-xr-xtests/run.sh1
2 files changed, 8 insertions, 4 deletions
diff --git a/libblkid/src/blkidP.h b/libblkid/src/blkidP.h
index 4dadfe7f2..6c62a057d 100644
--- a/libblkid/src/blkidP.h
+++ b/libblkid/src/blkidP.h
@@ -338,15 +338,18 @@ struct blkid_struct_cache
#define BLKID_DEBUG_ALL 0xFFFF
#ifdef CONFIG_BLKID_DEBUG
+# include <stdio.h>
+# include <stdarg.h>
extern int blkid_debug_mask;
extern void blkid_init_debug(int mask);
extern void blkid_debug_dump_dev(blkid_dev dev);
extern void blkid_debug_dump_tag(blkid_tag tag);
-#define DBG(m,x) do { \
- if ((BLKID_DEBUG_ ## m) & blkid_debug_mask) \
+# define DBG(m,x) do { \
+ if ((BLKID_DEBUG_ ## m) & blkid_debug_mask) { \
fprintf(stderr, "%d: libblkid: %8s: ", getpid(), # m); \
x; \
+ } \
} while (0)
static inline void __attribute__ ((__format__ (__printf__, 1, 2)))
@@ -360,8 +363,8 @@ blkid_debug(const char *mesg, ...)
}
#else /* !CONFIG_BLKID_DEBUG */
-#define DBG(m,x)
-#define blkid_init_debug(x)
+# define DBG(m,x) do { ; } while (0)
+# define blkid_init_debug(x)
#endif /* CONFIG_BLKID_DEBUG */
/* devno.c */
diff --git a/tests/run.sh b/tests/run.sh
index 9916edfd1..18525f0e6 100755
--- a/tests/run.sh
+++ b/tests/run.sh
@@ -110,6 +110,7 @@ fi
unset LIBMOUNT_DEBUG
unset LIBBLKID_DEBUG
+unset LIBFDISK_DEBUG
unset BLKID_DEBUG
echo