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

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