Blame SOURCES/0030-separate-FLAGS-out-in-h.patch

6975f2
From ca9ed7a3b07e68b17f63ce8de6c201267ef48887 Mon Sep 17 00:00:00 2001
6975f2
From: Jakub Kicinski <kuba@kernel.org>
6975f2
Date: Sun, 18 Oct 2020 14:31:47 -0700
6975f2
Subject: [PATCH 30/37] separate FLAGS out in -h
6975f2
6975f2
Help output is quite crowded already with every command
6975f2
being prefixed by --debug and --json options, and we're
6975f2
about to add a third one.
6975f2
6975f2
Add an indirection.
6975f2
6975f2
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
6975f2
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
6975f2
(cherry picked from commit d944e60dbeee28ef0c3581e6a90f2e3b75b1c8f7)
6975f2
---
6975f2
 ethtool.c | 9 ++++++---
6975f2
 1 file changed, 6 insertions(+), 3 deletions(-)
6975f2
6975f2
diff --git a/ethtool.c b/ethtool.c
6975f2
index 32ef80add923..9b56b0e2a628 100644
6975f2
--- a/ethtool.c
6975f2
+++ b/ethtool.c
6975f2
@@ -5963,10 +5963,10 @@ static int show_usage(struct cmd_context *ctx __maybe_unused)
6975f2
 	fprintf(stdout, PACKAGE " version " VERSION "\n");
6975f2
 	fprintf(stdout,
6975f2
 		"Usage:\n"
6975f2
-		"        ethtool [ --debug MASK ][ --json ] DEVNAME\t"
6975f2
+		"        ethtool [ FLAGS ] DEVNAME\t"
6975f2
 		"Display standard information about device\n");
6975f2
 	for (i = 0; args[i].opts; i++) {
6975f2
-		fputs("        ethtool [ --debug MASK ][ --json ] ", stdout);
6975f2
+		fputs("        ethtool [ FLAGS ] ", stdout);
6975f2
 		fprintf(stdout, "%s %s\t%s\n",
6975f2
 			args[i].opts,
6975f2
 			args[i].no_dev ? "\t" : "DEVNAME",
6975f2
@@ -5975,7 +5975,10 @@ static int show_usage(struct cmd_context *ctx __maybe_unused)
6975f2
 			fputs(args[i].xhelp, stdout);
6975f2
 	}
6975f2
 	nl_monitor_usage();
6975f2
-	fprintf(stdout, "Not all options support JSON output\n");
6975f2
+	fprintf(stdout, "\n");
6975f2
+	fprintf(stdout, "FLAGS:\n");
6975f2
+	fprintf(stdout, "	--debug MASK	turn on debugging messages\n");
6975f2
+	fprintf(stdout, "	--json		enable JSON output format (not supported by all commands)\n");
6975f2
 
6975f2
 	return 0;
6975f2
 }
6975f2
-- 
6975f2
2.26.2
6975f2