struct ul_debug_maskname {
const char *name;
- int mask;
+ unsigned mask;
const char *help;
};
#define UL_DEBUG_EMPTY_MASKNAMES {{ NULL, 0, NULL }}
#define UL_DEBUG_MASKNAMES(m) m ## _masknames
#define UL_DEBUG_MASK(m) m ## _debug_mask
-#define UL_DEBUG_DEFINE_MASK(m) int UL_DEBUG_MASK(m)
+#define UL_DEBUG_DEFINE_MASK(m) unsigned UL_DEBUG_MASK(m)
#define UL_DEBUG_DECLARE_MASK(m) extern UL_DEBUG_DEFINE_MASK(m)
#define UL_DEBUG_ALL 0xFFFFFF
extern void ul_debug(const char *mesg, ...)
__attribute__ ((__format__ (__printf__, 1, 2)));
extern void ul_debug_prefix(const char *lib, const char *flag,
- const void *handler, int mask);
-extern int ul_debug_parse_mask(const struct ul_debug_maskname flagnames[],
- const char *mask);
+ const void *handler, unsigned mask);
+extern unsigned ul_debug_parse_mask(const struct ul_debug_maskname flagnames[],
+ const char *mask);
extern void ul_debug_print_masks(const char *env,
const struct ul_debug_maskname flagnames[]);
}
void ul_debug_prefix(const char *lib, const char *flag,
- const void *handler, int mask)
+ const void *handler, unsigned mask)
{
fprintf(stderr, "%d: %s: %8s: ", getpid(), lib, flag);
if (handler && !(mask & __UL_DEBUG_FL_NOADDR))
fprintf(stderr, "[%p]: ", handler);
}
-int ul_debug_parse_mask(const struct ul_debug_maskname flagnames[],
- const char *mask)
+unsigned ul_debug_parse_mask(const struct ul_debug_maskname flagnames[],
+ const char *mask)
{
- int res;
+ unsigned res;
char *ptr;
/* let's check for a numeric mask first */
} \
} while (0)
-extern int pylibmount_debug_mask;
+extern unsigned pylibmount_debug_mask;
static inline void __attribute__ ((__format__ (__printf__, 1, 2)))
pymnt_debug(const char *mesg, ...)