#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[]
/* p - flag prefix, m - flag postfix */
#define UL_DEBUG_DEFINE_FLAG(p, m) p ## m
#include "blkidP.h"
UL_DEBUG_DEFINE_MASK(libblkid);
-
-static const struct dbg_mask libblkid_masknames [] = {
+UL_DEBUG_DEFINE_MASKANEMS(libblkid) =
+{
{ "all", BLKID_DEBUG_ALL },
{ "cache", BLKID_DEBUG_CACHE },
{ "dump", BLKID_DEBUG_DUMP },
#include "fdiskP.h"
UL_DEBUG_DEFINE_MASK(libfdisk);
-
-static const struct dbg_mask libfdisk_masknames[] = {
+UL_DEBUG_DEFINE_MASKANEMS(libfdisk) =
+{
{ "all", FDISK_DEBUG_ALL },
{ "init", FDISK_DEBUG_INIT },
{ "cxt", FDISK_DEBUG_CXT },
#include "mountP.h"
UL_DEBUG_DEFINE_MASK(libmount);
-static const struct dbg_mask libmount_masknames [] = {
+UL_DEBUG_DEFINE_MASKANEMS(libmount) =
+{
{ "all", MNT_DEBUG_ALL },
{ "init", MNT_DEBUG_INIT },
{ "cache", MNT_DEBUG_CACHE },
{ "diff", MNT_DEBUG_DIFF },
{ NULL, 0 }
};
+
/**
* mnt_init_debug:
* @mask: debug mask (0xffff to enable full debugging)