#include "c.h"
#include "list.h"
+#include "debug.h"
#include "libmount.h"
/* features */
# include <stdio.h>
# include <stdarg.h>
+#define DBG(m, x) do { __UL_DBG(libmount, MNT_DEBUG_, m, x); } while (0)
+#define INIT_DBG(m) do { __UL_INIT_DEBUG(libmount, MNT_DEBUG_, m, LIBMOUNT_DEBUG); } while (0)
+
# define WARN_REFCOUNT(m, o, r) \
do { \
if ((MNT_DEBUG_ ## m) & libmount_debug_mask && r != 0) \
} \
} while (0)
-# define DBG(m, x) do { \
- if ((MNT_DEBUG_ ## m) & libmount_debug_mask) { \
- fprintf(stderr, "%d: libmount: %8s: ", getpid(), # m); \
- x; \
- } \
- } while (0)
-
# define DBG_FLUSH do { \
if (libmount_debug_mask && \
libmount_debug_mask != MNT_DEBUG_INIT) \
strcmp(argv[1], "-h") == 0)
goto usage;
- mnt_init_debug(0);
+ INIT_DBG(0);
for (ts = tests; ts->name; ts++) {
if (strcmp(ts->name, argv[1]) == 0) {