[dpdk-dev] [PATCH v5 3/4] eal: use macros for help option
Thomas Monjalon
thomas at monjalon.net
Mon Apr 5 21:39:53 CEST 2021
The macros OPT_HELP and OPT_HELP_NUM were not used where appropriate.
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
---
lib/librte_eal/common/eal_common_options.c | 2 +-
lib/librte_eal/freebsd/eal.c | 2 +-
lib/librte_eal/linux/eal.c | 2 +-
lib/librte_eal/windows/eal.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index 08a85614c9..1da6583d71 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -2114,7 +2114,7 @@ eal_common_usage(void)
" must be specified once only.\n"
#endif /* !RTE_EXEC_ENV_WINDOWS */
" -v Display version information on startup\n"
- " -h, --help This help\n"
+ " -h, --"OPT_HELP" This help\n"
" --"OPT_IN_MEMORY" Operate entirely in memory. This will\n"
" disable secondary process support\n"
" --"OPT_BASE_VIRTADDR" Base virtual address\n"
diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
index 4e10d37253..73229ff9c4 100644
--- a/lib/librte_eal/freebsd/eal.c
+++ b/lib/librte_eal/freebsd/eal.c
@@ -549,7 +549,7 @@ eal_parse_args(int argc, char **argv)
}
break;
}
- case 'h':
+ case OPT_HELP_NUM:
eal_usage(prgname);
exit(EXIT_SUCCESS);
default:
diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c
index 4f36f9b1f5..d3615de641 100644
--- a/lib/librte_eal/linux/eal.c
+++ b/lib/librte_eal/linux/eal.c
@@ -717,7 +717,7 @@ eal_parse_args(int argc, char **argv)
continue;
switch (opt) {
- case 'h':
+ case OPT_HELP_NUM:
eal_usage(prgname);
exit(EXIT_SUCCESS);
diff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c
index 25921eecb2..5bca3ace1c 100644
--- a/lib/librte_eal/windows/eal.c
+++ b/lib/librte_eal/windows/eal.c
@@ -159,7 +159,7 @@ eal_parse_args(int argc, char **argv)
continue;
switch (opt) {
- case 'h':
+ case OPT_HELP_NUM:
eal_usage(prgname);
exit(EXIT_SUCCESS);
default:
--
2.31.1
More information about the dev
mailing list