Netdev List
 help / color / mirror / Atom feed
* [PATCH iproute2-next 1/2] dpll: align help and man notation with actual option parsing
@ 2026-05-12 13:52 Petr Oros
  2026-05-12 13:52 ` [PATCH iproute2-next 2/2] dpll: monitor: add -t/--timestamp and --tshort options Petr Oros
  2026-05-12 15:25 ` [PATCH iproute2-next 1/2] dpll: align help and man notation with actual option parsing Ivan Vecera
  0 siblings, 2 replies; 4+ messages in thread
From: Petr Oros @ 2026-05-12 13:52 UTC (permalink / raw)
  To: netdev; +Cc: ivecera, dsahern, stephen, vgrinber, Petr Oros

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>
---
 dpll/dpll.c     |  3 +--
 man/man8/dpll.8 | 12 ++++++------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/dpll/dpll.c b/dpll/dpll.c
index febf2a5d1fbdf4..81caa510078830 100644
--- a/dpll/dpll.c
+++ b/dpll/dpll.c
@@ -534,9 +534,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);
diff --git a/man/man8/dpll.8 b/man/man8/dpll.8
index c0d4b9caef2a6c..6b52970972f41a 100644
--- a/man/man8/dpll.8
+++ b/man/man8/dpll.8
@@ -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.
 
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-12 15:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12 13:52 [PATCH iproute2-next 1/2] dpll: align help and man notation with actual option parsing Petr Oros
2026-05-12 13:52 ` [PATCH iproute2-next 2/2] dpll: monitor: add -t/--timestamp and --tshort options Petr Oros
2026-05-12 15:26   ` Ivan Vecera
2026-05-12 15:25 ` [PATCH iproute2-next 1/2] dpll: align help and man notation with actual option parsing Ivan Vecera

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox