* [PATCH v2] perf tools: bug fix, an error of parsing 'man.<tool>.*' config variable.
@ 2016-02-04 9:17 Taeung Song
0 siblings, 0 replies; only message in thread
From: Taeung Song @ 2016-02-04 9:17 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, Jiri Olsa, Namhyung Kim, Ingo Molnar, Taeung Song,
Jiri Olsa
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 modify iskeychar() function to decide '.' 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 d3e12e3..3c01ced 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)
--
2.5.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-02-04 9:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-04 9:17 [PATCH v2] perf tools: bug fix, an error of parsing 'man.<tool>.*' config variable Taeung Song
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).