From: Timo Kokkonen Date: Thu, 26 Aug 2010 20:17:38 +0000 (+0300) Subject: parser: Use substring comparison in map names X-Git-Url: http://git.itanic.dy.fi/?p=scan-pagemap;a=commitdiff_plain;h=8791f3f456511b1704fa9c8975a3e2fad5f1f482 parser: Use substring comparison in map names This allows searching map names with only part of the string. Thanks to Tapani Pälli for the idea. Signed-off-by: Timo Kokkonen --- diff --git a/parse.c b/parse.c index 827264b..275da84 100644 --- a/parse.c +++ b/parse.c @@ -129,7 +129,7 @@ static int should_scan_mapping(struct parse_opts *opts, struct maps *map) int match = 0; if (is_parse_option(opts, PARSE_MAP_NAME)) { - if (!strcmp(opts->name, map->name)) + if (strstr(map->name, opts->name)) match = 1; if (is_parse_option(opts, PARSE_NOADD_TREE))