Thread (14 messages) flat view 14 messages, 3 authors, 2020-01-28
STALE2384d

[PATCH 9/9] rt-tests: svsematest: Display help with an error message for -h

From: John Kacur <jkacur@redhat.com>
Date: 2020-01-23 20:50:54
Subsystem: the rest · Maintainer: Linus Torvalds

Display help without an error message if the user uses the -h option

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 src/svsematest/svsematest.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/svsematest/svsematest.c b/src/svsematest/svsematest.c
index 7c15393fe1be..023a303fd7df 100644
--- a/src/svsematest/svsematest.c
+++ b/src/svsematest/svsematest.c
@@ -281,7 +281,7 @@ static void process_options (int argc, char *argv[])
 			{"help", no_argument, NULL, '?'},
 			{NULL, 0, NULL, 0}
 		};
-		int c = getopt_long (argc, argv, "a::b:d:f::i:l:D:p:St::",
+		int c = getopt_long (argc, argv, "a::b:d:f::i:l:D:p:St::h",
 			long_options, &option_index);
 		if (c == -1)
 			break;
@@ -335,6 +335,7 @@ static void process_options (int argc, char *argv[])
 			else
 				num_threads = max_cpus;
 			break;
+		case 'h': error = 1; break;
 		case '?': error = 1; break;
 		}
 	}
-- 
2.20.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help