From 8791f3f456511b1704fa9c8975a3e2fad5f1f482 Mon Sep 17 00:00:00 2001 From: Timo Kokkonen Date: Thu, 26 Aug 2010 23:17:38 +0300 Subject: [PATCH] parser: Use substring comparison in map names MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This allows searching map names with only part of the string. Thanks to Tapani Pälli for the idea. Signed-off-by: Timo Kokkonen --- parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- 2.44.0