dpll uses getopt_long(), which only accepts long options with the
"--" prefix. The iproute2-wide "-X[name]" shorthand used in the
help text and man page implies a single-dash long form
(e.g. -Version, -json, -pretty) that getopt_long does not parse;
only -V/--Version, -j/--json and -p/--pretty actually work.
Replace the misleading shorthand with explicit "-V | --Version"
style so the documented forms match what the parser accepts, and
drop the redundant second usage line in help() that listed only a
subset of the options and implied dpll could be invoked without an
OBJECT. No functional change.
Signed-off-by: Petr Oros <poros@redhat.com>
Reviewed-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
static void help(void)
{
pr_err("Usage: dpll [ OPTIONS ] OBJECT { COMMAND | help }\n"
- " dpll [ -j[son] ] [ -p[retty] ]\n"
"where OBJECT := { device | pin | monitor }\n"
- " OPTIONS := { -V[ersion] | -j[son] | -p[retty] }\n");
+ " OPTIONS := { -V | --Version | -j | --json | -p | --pretty }\n");
}
static int cmd_device(struct dpll *dpll);
.ti -8
.IR OPTIONS " := { "
-\fB\-V\fR[\fIersion\fR] |
-\fB\-j\fR[\fIson\fR] |
-\fB\-p\fR[\fIretty\fR] }
+\fB\-V\fR | \fB\-\-Version\fR |
+\fB\-j\fR | \fB\-\-json\fR |
+\fB\-p\fR | \fB\-\-pretty\fR }
.SH DESCRIPTION
The
.SH OPTIONS
.TP
-.BR "\-V" , " \-Version"
+.BR "\-V" , " \-\-Version"
Print the version of the
.B dpll
utility and exit.
.TP
-.BR "\-j" , " \-json"
+.BR "\-j" , " \-\-json"
Output results in JavaScript Object Notation (JSON).
.TP
-.BR "\-p" , " \-pretty"
+.BR "\-p" , " \-\-pretty"
When combined with \-j, generates a pretty JSON output with indentation
and newlines for better human readability.