diff options
author | Jakub Kicinski <kuba@kernel.org> | 2020-10-18 14:31:47 -0700 |
---|---|---|
committer | Michal Kubecek <mkubecek@suse.cz> | 2020-10-19 09:45:55 +0200 |
commit | d944e60dbeee28ef0c3581e6a90f2e3b75b1c8f7 (patch) | |
tree | 40e06aeb447d2e40588f15577683cd702e40eb76 | |
parent | 7e5c1ddbe67d0eefe9004e9a69f2ea5378e3bc5e (diff) | |
download | ethtool-d944e60dbeee28ef0c3581e6a90f2e3b75b1c8f7.tar.gz |
separate FLAGS out in -h
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>
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
-rw-r--r-- | ethtool.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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; } |