summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Wagner <wagi@monom.org>2019-06-05 17:37:42 +0200
committerJohn Kacur <jkacur@redhat.com>2019-06-19 01:04:06 +0200
commit81f63a4ebd511befc49332db351ce11b4fef40d6 (patch)
tree091a4d7d6d48e9f036b31127ad870230610f120e
parentedd0e70e55769dc723aa5edba5a335bf12921281 (diff)
downloadrt-tests-81f63a4ebd511befc49332db351ce11b4fef40d6.tar.gz
rt-tests-81f63a4ebd511befc49332db351ce11b4fef40d6.tar.xz
pi_stress: Allow short command line arguments
Add optstring to getopt_long() command line parser to support the short options as it documented in the man page and also in the usage help text. Signed-off-by: Daniel Wagner <wagi@monom.org> Signed-off-by: John Kacur <jkacur@redhat.com>
-rw-r--r--src/pi_tests/pi_stress.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pi_tests/pi_stress.c b/src/pi_tests/pi_stress.c
index ac7646c..543106b 100644
--- a/src/pi_tests/pi_stress.c
+++ b/src/pi_tests/pi_stress.c
@@ -1322,9 +1322,8 @@ int process_sched_line(const char *arg)
void process_command_line(int argc, char **argv)
{
int opt;
- while ((opt = getopt_long(argc, argv, "+", options, NULL)) != -1) {
+ while ((opt = getopt_long(argc, argv, "+ht:vqi:g:rs:pdVum", options, NULL)) != -1) {
switch (opt) {
- case '?':
case 'h':
usage();
exit(0);