From 4f3bc3f5ed0f192000c64d9a0f7c00f4500230d2 Mon Sep 17 00:00:00 2001 From: "Yi Soo, An" Date: Wed, 28 Sep 2016 20:28:30 +0900 Subject: [PATCH] perf config: fix bug in parsing 'man..*' config To add new man viewer, configs like 'man..cmd', 'man..path' can be set into config file (~/.perfconfig). But parsing config file is stopped because the config variable contains '.' character i.e. If setting 'man.xman.cmd' into config file, [man] gman.cmd = gman when launching perf an error message is printed like below. Fatal: bad config file line 11 in /home/hja/.perfconfig So modify iskeychar() function to decide '.' character as key character parsing config file. Acked-by: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Yi Soo, An --- tools/perf/util/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c index 18dae745034f..f5c3882a1149 100644 --- a/tools/perf/util/config.c +++ b/tools/perf/util/config.c @@ -124,7 +124,7 @@ static char *parse_value(void) static inline int iskeychar(int c) { - return isalnum(c) || c == '-' || c == '_'; + return isalnum(c) || c == '-' || c == '_' || c == '.'; } static int get_value(config_fn_t fn, void *data, char *name, unsigned int len)