From: Karel Zak Date: Tue, 29 Nov 2011 17:06:21 +0000 (+0100) Subject: libmount: use USAGE_* from mount(8) sample X-Git-Tag: v2.21-rc1~152 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4c92d0617f5e73d6590083762fae328b865cb31;p=thirdparty%2Futil-linux.git libmount: use USAGE_* from mount(8) sample Signed-off-by: Karel Zak --- diff --git a/libmount/samples/mount.c b/libmount/samples/mount.c index 6f5dbda992..bb7ee9e542 100644 --- a/libmount/samples/mount.c +++ b/libmount/samples/mount.c @@ -192,7 +192,8 @@ static int mount_all(struct libmnt_context *cxt, static void __attribute__((__noreturn__)) usage(FILE *out) { - fprintf(out, _("Usage:\n" + fputs(USAGE_HEADER, out); + fprintf(out, _( " %1$s [-lhV]\n" " %1$s -a [options]\n" " %1$s [options] | \n" @@ -200,8 +201,8 @@ static void __attribute__((__noreturn__)) usage(FILE *out) " %1$s []\n"), program_invocation_short_name); + fputs(USAGE_OPTIONS, out); fprintf(out, _( - "\nOptions:\n" " -a, --all mount all filesystems mentioned in fstab\n" " -c, --no-canonicalize don't canonicalize paths\n" " -f, --fake dry run; skip the mount(2) syscall\n" @@ -221,6 +222,10 @@ static void __attribute__((__noreturn__)) usage(FILE *out) " -V, --version display version information and exit\n" " -w, --read-write mount the filesystem read-write (default)\n")); + fputs(USAGE_SEPARATOR, out); + fputs(USAGE_HELP, out); + fputs(USAGE_VERSION, out); + fprintf(out, _( "\nSource:\n" " -L, --label