Netdev List
 help / color / mirror / Atom feed
From: Petr Oros <poros@redhat.com>
To: netdev@vger.kernel.org
Cc: ivecera@redhat.com, dsahern@kernel.org,
	stephen@networkplumber.org, vgrinber@redhat.com,
	Petr Oros <poros@redhat.com>
Subject: [PATCH iproute2-next 1/2] dpll: align help and man notation with actual option parsing
Date: Tue, 12 May 2026 15:52:24 +0200	[thread overview]
Message-ID: <20260512135225.167158-1-poros@redhat.com> (raw)

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


             reply	other threads:[~2026-05-12 13:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12 13:52 Petr Oros [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260512135225.167158-1-poros@redhat.com \
    --to=poros@redhat.com \
    --cc=dsahern@kernel.org \
    --cc=ivecera@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=vgrinber@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox