]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
include/debug: allow to speficy empty masknames
authorKarel Zak <kzak@redhat.com>
Wed, 13 Aug 2014 12:19:21 +0000 (14:19 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 13 Aug 2014 12:19:21 +0000 (14:19 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
include/debug.h

index af5b9ea90338dc2dd8841f8a0f86f4ccdfbb2492..25045aa942360113c3b9db9a18e81dd56bbcbf61 100644 (file)
@@ -10,6 +10,9 @@
 #include <stdarg.h>
 #include <string.h>
 
+struct dbg_mask { char *mname; int val; };
+#define UL_DEBUG_EMPTY_MASKNAMES {{ NULL, 0 }}
+
 #define UL_DEBUG_DEFINE_MASK(m) int m ## _debug_mask
 #define UL_DEBUG_DECLARE_MASK(m) extern UL_DEBUG_DEFINE_MASK(m)
 #define UL_DEBUG_DEFINE_MASKANEMS(m) static const struct dbg_mask m ## _masknames[]
@@ -59,7 +62,6 @@
                } \
        } while (0)
 
-struct dbg_mask { char *mname; int val; };
 
 static inline void __attribute__ ((__format__ (__printf__, 1, 2)))
 ul_debug(const char *mesg, ...)