[dpdk-stable] [PATCH v5 2/3] app/regex: fix usage text
Thomas Monjalon
thomas at monjalon.net
Mon Apr 5 21:33:24 CEST 2021
The usage syntax help includes the program name which was fake.
It is replaced with the real name from argv.
Fixes: de06137cb295 ("app/regex: add RegEx test application")
Cc: stable at dpdk.org
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
Acked-by: Ori Kam <orika at nvidia.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
---
app/test-regex/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test-regex/main.c b/app/test-regex/main.c
index 7bb87bb1b8..f18dc2eef8 100644
--- a/app/test-regex/main.c
+++ b/app/test-regex/main.c
@@ -151,10 +151,10 @@ args_parse(int argc, char **argv, char *rules_file, char *data_file,
*nb_lcores = atoi(optarg);
break;
case ARG_HELP:
- usage("RegEx test app");
+ usage(argv[0]);
break;
default:
- usage("RegEx test app");
+ usage(argv[0]);
rte_exit(EXIT_FAILURE, "Invalid option: %s\n", argv[optind]);
break;
}
--
2.31.1
More information about the stable
mailing list