eal: turn off getopt_long error messages
Checks
Commit Message
When using dpdk register option api when parsing for log level
the opterr flags was still set to one causing an error message
from getopt_long(). Set opterr to zero to disable error messages.
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
---
lib/librte_eal/bsdapp/eal/eal.c | 1 +
lib/librte_eal/linuxapp/eal/eal.c | 1 +
2 files changed, 2 insertions(+)
Comments
16/12/2018 17:45, Keith Wiles:
> When using dpdk register option api when parsing for log level
> the opterr flags was still set to one causing an error message
> from getopt_long(). Set opterr to zero to disable error messages.
Please could you be more specific?
Which function call? Which error message?
We need also Fixes: and stable tags for backport.
Thanks
Keith, it seems you missed my questions below:
19/12/2018 21:35, Thomas Monjalon:
> 16/12/2018 17:45, Keith Wiles:
> > When using dpdk register option api when parsing for log level
> > the opterr flags was still set to one causing an error message
> > from getopt_long(). Set opterr to zero to disable error messages.
>
> Please could you be more specific?
> Which function call? Which error message?
>
> We need also Fixes: and stable tags for backport.
> Thanks
@@ -374,6 +374,7 @@ eal_log_level_parse(int argc, char **argv)
argvopt = argv;
optind = 1;
optreset = 1;
+ opterr = 0;
while ((opt = getopt_long(argc, argvopt, eal_short_options,
eal_long_options, &option_index)) != EOF) {
@@ -565,6 +565,7 @@ eal_log_level_parse(int argc, char **argv)
argvopt = argv;
optind = 1;
+ opterr = 0;
while ((opt = getopt_long(argc, argvopt, eal_short_options,
eal_long_options, &option_index)) != EOF) {