lkml.org 
[lkml]   [2015]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] perf tools: bug fix, an error of parsing 'man.<tool>.*' config variable.
Date
To add new man viewer, configs like 'man.<tool>.cmd',
'man.<tool>.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 accept '.' character as key character parsing config file.

Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
---
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 2e452ac..f43595e 100644
--- a/tools/perf/util/config.c
+++ b/tools/perf/util/config.c
@@ -122,7 +122,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)
--
1.9.1


\
 
 \ /
  Last update: 2015-12-02 09:41    [W:0.023 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site