app/regex: fix usage text
authorThomas Monjalon <thomas@monjalon.net>
Mon, 5 Apr 2021 19:33:24 +0000 (21:33 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 9 Apr 2021 12:31:41 +0000 (14:31 +0200)
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@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
app/test-regex/main.c

index 18a22db..8e665df 100644 (file)
@@ -159,10 +159,10 @@ args_parse(int argc, char **argv, char *rules_file, char *data_file,
                        *nb_segs = 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;
                }