diff options
Diffstat (limited to 'libmount/src/init.c')
-rw-r--r-- | libmount/src/init.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/libmount/src/init.c b/libmount/src/init.c index 58d4c1887..4e5f489c4 100644 --- a/libmount/src/init.c +++ b/libmount/src/init.c @@ -38,8 +38,21 @@ void mnt_init_debug(int mask) } else libmount_debug_mask = mask; - if (libmount_debug_mask) - fprintf(stderr, "libmount: debug mask set to 0x%04x.\n", - libmount_debug_mask); libmount_debug_mask |= MNT_DEBUG_INIT; + + if (libmount_debug_mask && libmount_debug_mask != MNT_DEBUG_INIT) { + const char *ver = NULL; + const char **features = NULL, **p; + + DBG(INIT, mnt_debug("library debug mask: 0x%04x", + libmount_debug_mask)); + + mnt_get_library_version(&ver); + mnt_get_library_features(&features); + + DBG(INIT, mnt_debug("library version: %s", ver)); + p = features; + while (p && *p) + DBG(INIT, mnt_debug(" feature: %s", *p++)); + } } |