diff options
author | Karel Zak | 2012-01-23 12:28:05 +0100 |
---|---|---|
committer | Karel Zak | 2012-01-23 12:28:05 +0100 |
commit | ac8ecab4bec840a381b1e901e905ca78f7c3e453 (patch) | |
tree | a563a00634bf1f2218e77219f25b3292a7cc825c /sys-utils/mount.c | |
parent | libmount: export info about library features (diff) | |
download | kernel-qcow2-util-linux-ac8ecab4bec840a381b1e901e905ca78f7c3e453.tar.gz kernel-qcow2-util-linux-ac8ecab4bec840a381b1e901e905ca78f7c3e453.tar.xz kernel-qcow2-util-linux-ac8ecab4bec840a381b1e901e905ca78f7c3e453.zip |
mount: add info about libmount features to --version output
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/mount.c')
-rw-r--r-- | sys-utils/mount.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sys-utils/mount.c b/sys-utils/mount.c index 634f72f84..280bab035 100644 --- a/sys-utils/mount.c +++ b/sys-utils/mount.c @@ -75,11 +75,21 @@ static void __attribute__((__noreturn__)) exit_non_root(const char *option) static void __attribute__((__noreturn__)) print_version(void) { const char *ver = NULL; + const char **features = NULL, **p; mnt_get_library_version(&ver); - - printf(_("%s from %s (libmount %s)\n"), - program_invocation_short_name, PACKAGE_STRING, ver); + mnt_get_library_features(&features); + + printf(_("%s from %s (libmount %s"), + program_invocation_short_name, + PACKAGE_STRING, + ver); + p = features; + while (p && *p) { + fputs(p == features ? ": " : ", ", stdout); + fputs(*p++, stdout); + } + fputs(")\n", stdout); exit(MOUNT_EX_SUCCESS); } |