]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
dpll: align help and man notation with actual option parsing main
authorPetr Oros <poros@redhat.com>
Tue, 12 May 2026 13:52:24 +0000 (15:52 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Sun, 17 May 2026 22:35:09 +0000 (15:35 -0700)
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>
dpll/dpll.c
man/man8/dpll.8

index b6ba3283e0ba86368a5f37496b614276f48c30d9..2af77201141e61ae8b770ff68e7921be61b98d37 100644 (file)
@@ -480,9 +480,8 @@ static void dpll_pr_freq_range(__u64 freq_min, __u64 freq_max)
 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);
index 3abed86f1d52f316b339212168f651406abcdd1a..a8f770b3808cb7fabe97958573bd73a23c14112b 100644 (file)
@@ -27,9 +27,9 @@ dpll \- Digital Phase Locked Loop (DPLL) subsystem management
 
 .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
@@ -44,17 +44,17 @@ internal oscillators.
 
 .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.