diff options
author | Karel Zak | 2011-11-29 18:06:21 +0100 |
---|---|---|
committer | Karel Zak | 2011-11-29 18:06:21 +0100 |
commit | e4c92d0617f5e73d6590083762fae328b865cb31 (patch) | |
tree | fbc3d710b78f392f204e5b78fe6696070451abf2 /libmount/samples/mount.c | |
parent | libmount: add sanitize_env() to mount(8) sample (diff) | |
download | kernel-qcow2-util-linux-e4c92d0617f5e73d6590083762fae328b865cb31.tar.gz kernel-qcow2-util-linux-e4c92d0617f5e73d6590083762fae328b865cb31.tar.xz kernel-qcow2-util-linux-e4c92d0617f5e73d6590083762fae328b865cb31.zip |
libmount: use USAGE_* from mount(8) sample
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/samples/mount.c')
-rw-r--r-- | libmount/samples/mount.c | 11 |
1 files changed, 8 insertions, 3 deletions
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] <source> | <directory>\n" @@ -200,8 +201,8 @@ static void __attribute__((__noreturn__)) usage(FILE *out) " %1$s <operation> <mountpoint> [<target>]\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 <label> synonym for LABEL=<label>\n" @@ -248,7 +253,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out) " --make-rprivate recursively mark a whole subtree as private\n" " --make-runbindable recursively mark a whole subtree as unbindable\n")); - fprintf(out, _("\nFor more information see mount(8).\n")); + fprintf(out, USAGE_MAN_TAIL("mount(8)")); exit(out == stderr ? EX_USAGE : EX_SUCCESS); } |