From: Jakub Kicinski <kuba@kernel.org>
To: mkubecek@suse.cz
Cc: netdev@vger.kernel.org, kernel-team@fb.com,
Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH ethtool-next v2 3/6] separate FLAGS out in -h
Date: Tue, 6 Oct 2020 08:04:22 -0700 [thread overview]
Message-ID: <20201006150425.2631432-4-kuba@kernel.org> (raw)
In-Reply-To: <20201006150425.2631432-1-kuba@kernel.org>
Help output is quite crowded already with every command
being prefixed by --debug and --json options, and we're
about to add a third one.
Add an indirection.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
ethtool.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/ethtool.c b/ethtool.c
index 2a7de97c51bb..403616bb7fa0 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -6015,10 +6015,10 @@ static int show_usage(struct cmd_context *ctx __maybe_unused)
fprintf(stdout, PACKAGE " version " VERSION "\n");
fprintf(stdout,
"Usage:\n"
- " ethtool [ --debug MASK ][ --json ] DEVNAME\t"
+ " ethtool [ FLAGS ] DEVNAME\t"
"Display standard information about device\n");
for (i = 0; args[i].opts; i++) {
- fputs(" ethtool [ --debug MASK ][ --json ] ", stdout);
+ fputs(" ethtool [ FLAGS ] ", stdout);
fprintf(stdout, "%s %s\t%s\n",
args[i].opts,
args[i].no_dev ? "\t" : "DEVNAME",
@@ -6027,7 +6027,10 @@ static int show_usage(struct cmd_context *ctx __maybe_unused)
fputs(args[i].xhelp, stdout);
}
nl_monitor_usage();
- fprintf(stdout, "Not all options support JSON output\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, "FLAGS:\n");
+ fprintf(stdout, " --debug MASK turn on debugging messages\n");
+ fprintf(stdout, " --json enable JSON output format (not supported by all commands)\n");
return 0;
}
--
2.26.2
next prev parent reply other threads:[~2020-10-06 15:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-06 15:04 [PATCH ethtool-next v2 0/6] pause frame stats Jakub Kicinski
2020-10-06 15:04 ` [PATCH ethtool-next v2 1/6] update UAPI header copies Jakub Kicinski
2020-10-06 15:04 ` [PATCH ethtool-next v2 2/6] pause: add --json support Jakub Kicinski
2020-10-06 15:04 ` Jakub Kicinski [this message]
2020-10-06 15:04 ` [PATCH ethtool-next v2 4/6] add support for stats in subcommands Jakub Kicinski
2020-10-06 15:04 ` [PATCH ethtool-next v2 5/6] netlink: use policy dumping to check if stats flag is supported Jakub Kicinski
2020-10-06 19:39 ` Ido Schimmel
2020-10-06 20:00 ` Michal Kubecek
2020-10-12 15:44 ` Michal Kubecek
2020-10-06 15:04 ` [PATCH ethtool-next v2 6/6] pause: add support for dumping statistics Jakub Kicinski
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=20201006150425.2631432-4-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=kernel-team@fb.com \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.