/** * mnt_init_debug: * @mask: debug mask (0xffff to enable full debugging) * * If the @mask is not specified, then this function reads * the LIBMOUNT_DEBUG environment variable to get the mask. * * Already initialized debugging stuff cannot be changed. Calling * this function twice has no effect. */ void mnt_init_debug(int mask) { if (libmount_debug_mask) return; __UL_INIT_DEBUG(libmount, MNT_DEBUG_, mask, LIBMOUNT_DEBUG); if (libmount_debug_mask != MNT_DEBUG_INIT && libmount_debug_mask != (MNT_DEBUG_HELP|MNT_DEBUG_INIT)) { const char *ver = NULL; const char **features = NULL, **p; mnt_get_library_version(&ver); mnt_get_library_features(&features); DBG(INIT, ul_debug("library debug mask: 0x%04x", libmount_debug_mask)); DBG(INIT, ul_debug("library version: %s", ver)); p = features; while (p && *p) DBG(INIT, ul_debug(" feature: %s", *p++)); } ON_DBG(HELP, ul_debug_print_masks("LIBMOUNT_DEBUG", UL_DEBUG_MASKNAMES(libmount))); }
/** * blkid_init_debug: * @mask: debug mask (0xffff to enable full debugging) * * If the @mask is not specified then this function reads * LIBBLKID_DEBUG environment variable to get the mask. * * Already initialized debugging stuff cannot be changed. It does not * have effect to call this function twice. */ void blkid_init_debug(int mask) { if (libblkid_debug_mask) return; __UL_INIT_DEBUG(libblkid, BLKID_DEBUG_, mask, LIBBLKID_DEBUG); if (libblkid_debug_mask != BLKID_DEBUG_INIT && libblkid_debug_mask != (BLKID_DEBUG_HELP|BLKID_DEBUG_INIT)) { const char *ver = NULL; const char *date = NULL; blkid_get_library_version(&ver, &date); DBG(INIT, ul_debug("library debug mask: 0x%04x", libblkid_debug_mask)); DBG(INIT, ul_debug("library version: %s [%s]", ver, date)); } ON_DBG(HELP, ul_debug_print_masks("LIBBLKID_DEBUG", UL_DEBUG_MASKNAMES(libblkid))); }