]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
partx: cleanup usage() and man page, add undocumented --verbose
authorKarel Zak <kzak@redhat.com>
Thu, 8 Dec 2011 13:14:28 +0000 (14:14 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 8 Dec 2011 13:14:28 +0000 (14:14 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
partx/partx.8
partx/partx.c

index 4129d78c09c50508b4890859d633d29ca1fc3ac1..dd5ebe7be84d376786ee6e15a1949501f2e67d5b 100644 (file)
@@ -56,6 +56,8 @@ Print the SIZE column in bytes rather than in human-readable format.
 Delete the specified partitions or all partitions.
 .IP "\fB\-g, \-\-noheadings\fP"
 Do not print a header line.
+.IP "\fB\-h, \-\-help\fP"
+Print a help text and exit.
 .IP "\fB\-l, \-\-list\fP"
 List the partitions.  Note that all numbers are in 512-byte sectors.  This output
 format is DEPRECATED in favour of \fB\-\-show\fP.  Don't use it in newly written
@@ -64,14 +66,8 @@ scripts.
 Define the output columns to use for \fB\-\-show\fP and  \fB\-\-raw\fP output.
 If no output arrangement is specified, then a default set is used.
 Use \fB\-\-help\fP to  get list of all supported columns.
-.IP "\fB\-r, \-\-raw\fP"
-Use the raw output format.
-.IP "\fB\-s, \-\-show\fP"
-List the partitions.  All numbers (except SIZE) are in 512-byte sectors.  The output
-columns can be rearranged with the \fB\-\-output\fP option.
-.IP "\fB\-t, \-\-type \fItype\fP"
-Specify the partition table type -- aix, bsd, dos, gpt, mac, minix, sgi, solaris_x86,
-sun, ultrix or unixware.
+.IP "\fB\-P, \-\-pairs\fP"
+Use key="value" output format.
 .IP "\fB\-n, \-\-nr \fIM:N\fP"
 Specify the range of partitions.  For backward compatibility also the format
 <M-N> is supported.  The range may contain negative
@@ -93,6 +89,16 @@ or
 .B <M-N>
 Specifies lower and upper limits (e.g. --nr 2:4).
 .RE
+.IP "\fB\-r, \-\-raw\fP"
+Use the raw output format.
+.IP "\fB\-s, \-\-show\fP"
+List the partitions.  All numbers (except SIZE) are in 512-byte sectors.  The output
+columns can be rearranged with the \fB\-\-output\fP option.
+.IP "\fB\-t, \-\-type \fItype\fP"
+Specify the partition table type -- aix, bsd, dos, gpt, mac, minix, sgi, solaris_x86,
+sun, ultrix or unixware.
+.IP "\fB\-v, \-\-verbose\fP"
+Verbose mode.
 .SH EXAMPLES
 .IP "\fBpartx \-\-show /dev/sdb3\fP"
 .IP "\fBpartx \-\-show --nr 3 /dev/sdb\fP"
index 7c4235bb0e31e738cecb99ff8dee69efd15bb93e..6a3d3555522a0593ea92684998ae68250f2de071 100644 (file)
@@ -614,7 +614,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
              _(" %s [-a|-d|-s] [--nr <n:m> | <partition>] <disk>\n"),
                program_invocation_short_name);
 
-       fputs(_("\nOptions:\n"), out);
+       fputs(USAGE_OPTIONS, out);
        fputs(_(" -a, --add            add specified partitions or all of them\n"
                " -d, --delete         delete specified partitions or all of them\n"
                " -l, --list           list partitions (DEPRECATED)\n"
@@ -622,12 +622,16 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
 
                " -b, --bytes          print SIZE in bytes rather than in human readable format\n"
                " -g, --noheadings     don't print headings for --show\n"
+               " -n, --nr <n:m>       specify the range of partitions (e.g. --nr 2:4)\n"
+               " -o, --output <type>  define which output columns to use\n"
                " -P, --pairs          use key=\"value\" output format\n"
                " -r, --raw            use raw output format\n"
                " -t, --type <type>    specify the partition type (dos, bsd, solaris, etc.)\n"
-               " -n, --nr <n:m>       specify the range of partitions (e.g. --nr 2:4)\n"
-               " -o, --output <type>  define which output columns to use\n"
-               " -h, --help           print this help\n"), out);
+               " -v, --verbose        verbose mode\n"), out);
+
+       fputs(USAGE_SEPARATOR, out);
+       fputs(USAGE_HELP, out);
+       fputs(USAGE_VERSION, out);
 
        fputs(_("\nAvailable columns (for --show, --raw or --pairs):\n"), out);
 
@@ -667,6 +671,7 @@ int main(int argc, char **argv)
                { "output",     required_argument, NULL, 'o' },
                { "pairs",      no_argument,       NULL, 'P' },
                { "help",       no_argument,       NULL, 'h' },
+               { "verbose",    no_argument,       NULL, 'v' },
                { NULL, 0, NULL, 0 }
        };