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 --- 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