log: catch invalid level option number
authorThomas Monjalon <thomas@monjalon.net>
Thu, 8 Apr 2021 16:47:12 +0000 (18:47 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 9 Apr 2021 10:56:09 +0000 (12:56 +0200)
commitc2bd208a9079acc46c340adcf97d68ed332de38a
treebd185e5c8e5f1d5274724aa60b68ddc944cceb7f
parent806d888a809b128c8fe2c35201f01b991c2a3da0
log: catch invalid level option number

The parsing check for invalid log level was not trying to catch
irrelevant numeric values.
A log level 0 becomes a failure in parsing so it can be caught early.
A log level higher than the max (8) is accepted with a warning message.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: David Marchand <david.marchand@redhat.com>
lib/librte_eal/common/eal_common_options.c