From e4c92d0617f5e73d6590083762fae328b865cb31 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 29 Nov 2011 18:06:21 +0100 Subject: libmount: use USAGE_* from mount(8) sample Signed-off-by: Karel Zak --- libmount/samples/mount.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'libmount/samples/mount.c') diff --git a/libmount/samples/mount.c b/libmount/samples/mount.c index 6f5dbda99..bb7ee9e54 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