[01/11] log: fix plugin level restore with patterns
Checks
Commit Message
Same fix as the commit 6ff0f81d0ef7 ("log: fix pattern matching"),
fnmatch returns 0 on success.
Fixes: 7f0bb634a140 ("log: add ability to match log type with globbing")
Fixes: 6ff0f81d0ef7 ("log: fix pattern matching")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
lib/librte_eal/common/eal_common_log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 8/19/19 2:41 PM, David Marchand wrote:
> Same fix as the commit 6ff0f81d0ef7 ("log: fix pattern matching"),
> fnmatch returns 0 on success.
>
> Fixes: 7f0bb634a140 ("log: add ability to match log type with globbing")
> Fixes: 6ff0f81d0ef7 ("log: fix pattern matching")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -284,7 +284,7 @@ rte_log_register_type_and_pick_level(const char *name, uint32_t level_def)
continue;
if (opt_ll->pattern) {
- if (fnmatch(opt_ll->pattern, name, 0))
+ if (fnmatch(opt_ll->pattern, name, 0) == 0)
level = opt_ll->level;
} else {
if (regexec(&opt_ll->re_match, name, 0, NULL, 0) == 0)