]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: fix DBG()
authorKarel Zak <kzak@redhat.com>
Tue, 9 Apr 2013 10:44:02 +0000 (12:44 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 9 Apr 2013 10:44:02 +0000 (12:44 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/blkidP.h
tests/run.sh

index 4dadfe7f27bda13ca76b71df38357c6b50dc3df3..6c62a057daa4868ed1652fd9f0e56f81f4877713 100644 (file)
@@ -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 */
index 9916edfd11f194dd9de7b870a873f78f5f79824e..18525f0e6dfbd2124fe99ff38fe18d51e137e5fe 100755 (executable)
@@ -110,6 +110,7 @@ fi
 
 unset LIBMOUNT_DEBUG
 unset LIBBLKID_DEBUG
+unset LIBFDISK_DEBUG
 unset BLKID_DEBUG
 
 echo