log: actually do substring matches with fnmatch
Historically we matched log filters with strstr(), and when switching to fnmatch in cbb0fd3c, it was stated that we would continue to match substrings, with "foo" being equivalent to "*foo*". Unfortuntely I forget to provide the code to actually make that happen. This fixes it to prepend and append "*". We don't bother to check if the pattern already has a leading/trailing '*', because "**foo**" will match the same as "*foo*". Reviewed-by: NErik Skultety <eskultet@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
Showing
想要评论请 注册 或 登录