perf tools: bug fix, an error of parsing 'man.<tool>.*' config variable.
PATCH RESEND 1/1 perf tools: bug fix, an error of parsing 'man.<tool>.*' config variable.
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.
--- tools/perf/util/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/config.c +1 -1
@@ -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)
Signature · 1 line
2.5.0
Hi Taeung,
Quoted 5 lines · Taeung Song
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.
Quoted 8 lines
If setting 'man.xman.cmd' into config file,
[man]
gman.cmd = gmanwhen launching perf an error message is printed like below.
Fatal: bad config file line 11 in
/home/taeung/.perfconfig
Not sure anyone actually uses this..
Anyway, it should be fixed since man viewer code requires it.
Quoted 6 lines
So modify
iskeychar()function to decide '.' character as key character parsing config file.Cc Jiri Olsa <[email protected]>Signed-off-by Taeung Song <[email protected]>
Thanks,
Namhyung
Quoted 20 lines
--- tools/perf/util/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/util/config.c +1
-1@@ -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)Signature · 1 line
2.5.0