From: Masami Hiramatsu Date: Fri, 17 Dec 2010 13:12:00 +0000 (+0900) Subject: perf tools: Fix lazy wildcard matching X-Git-Tag: firefly_0821_release~7613^2~3164^2~1^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ea187cfbb9a3de73e7bd7b7125ae345d92d4384b;p=firefly-linux-kernel-4.4.55.git perf tools: Fix lazy wildcard matching Fix lazy wildcard matching to ignore space after wild card. Cc: 2nddept-manager@sdl.hitachi.co.jp Cc: Frederic Weisbecker Cc: Hitoshi Mitake Cc: Ingo Molnar Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Srikar Dronamraju Cc: Steven Rostedt LKML-Reference: <20101217131200.24123.8202.stgit@ltc236.sdl.hitachi.co.jp> Signed-off-by: Masami Hiramatsu Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/string.c b/tools/perf/util/string.c index 0409fc7c0058..8fc0bd3a3a4a 100644 --- a/tools/perf/util/string.c +++ b/tools/perf/util/string.c @@ -259,7 +259,7 @@ static bool __match_glob(const char *str, const char *pat, bool ignore_space) if (!*pat) /* Tail wild card matches all */ return true; while (*str) - if (strglobmatch(str++, pat)) + if (__match_glob(str++, pat, ignore_space)) return true; } return !*str && !*pat;