Stefan Hajnoczi <stefa...@redhat.com> writes:
> On Thu, Dec 05, 2019 at 12:25:17PM +0000, Alex Bennée wrote: >> We already use g_pattern_match elsewhere so remove the duplication. >> >> Signed-off-by: Alex Bennée <alex.ben...@linaro.org> >> --- >> trace/control.c | 35 +---------------------------------- >> 1 file changed, 1 insertion(+), 34 deletions(-) > > Is g_pattern_match() a superset of pattern_glob()? Existing patterns > should continue to work. Yes - it supports more than pattern_glob and a bit less than the system glob(): The g_pattern_match* functions match a string against a pattern containing '*' and '?' wildcards with similar semantics as the standard glob() function: '*' matches an arbitrary, possibly empty, string, '?' matches an arbitrary character. Note that in contrast to glob(), the '/' character can be matched by the wildcards, there are no '[...]' character ranges and '*' and '?' can not be escaped to include them literally in a pattern. If you give me some example existing pattern forms we can add them to test-logging. I manually tested both single and double * patterns while working on the rest of the series. > > Stefan -- Alex Bennée