From 8a7135380b70fee178e3d4ac004875095df55d7b Mon Sep 17 00:00:00 2001 From: Seonyoung Date: Thu, 29 Sep 2016 00:35:07 -0700 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/taeung/.perfconfig So modify iskeychar() function to decide '.' character as key character parsing config file. Acked-by: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Kim SeonYoung --- 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..8fd159b60bec 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)