]> git.itanic.dy.fi Git - scan-pagemap/commitdiff
parser: Use substring comparison in map names
authorTimo Kokkonen <kaapeli@itanic.dy.fi>
Thu, 26 Aug 2010 20:17:38 +0000 (23:17 +0300)
committerTimo Kokkonen <kaapeli@itanic.dy.fi>
Thu, 26 Aug 2010 20:17:38 +0000 (23:17 +0300)
This allows searching map names with only part of the string. Thanks
to Tapani Pälli for the idea.

Signed-off-by: Timo Kokkonen <kaapeli@itanic.dy.fi>
parse.c

diff --git a/parse.c b/parse.c
index 827264b8fb315e5a5a631a72759b517be9895f8c..275da846fd59f792a46c95f0270e79591d25b401 100644 (file)
--- 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)) {
        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))
                        match = 1;
 
                if (is_parse_option(opts, PARSE_NOADD_TREE))