loglevel set wrong when ":" is used as separator, like
--log-type="user:debug"
This is because fnmatch returns zero on success. Fixed fnmatch return
value check.
Fixes:
7f0bb634a140 ("log: add ability to match log type with globbing")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
if (rte_logs.dynamic_types[i].name == NULL)
continue;
- if (fnmatch(pattern, rte_logs.dynamic_types[i].name, 0))
+ if (fnmatch(pattern, rte_logs.dynamic_types[i].name, 0) == 0)
rte_logs.dynamic_types[i].loglevel = level;
}