Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1303276 > unrolled thread
| Started by | Taeung Song <treeze.taeung@gmail.com> |
|---|---|
| First post | 2016-01-07 05:10 +0100 |
| Last post | 2016-01-07 09:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH RESEND] perf tools: bug fix, an error of parsing 'man.<tool>.*' config variable. Taeung Song <treeze.taeung@gmail.com> - 2016-01-07 05:10 +0100
Re: [PATCH RESEND] perf tools: bug fix, an error of parsing 'man.<tool>.*' config variable. Namhyung Kim <namhyung@kernel.org> - 2016-01-07 09:10 +0100
| From | Taeung Song <treeze.taeung@gmail.com> |
|---|---|
| Date | 2016-01-07 05:10 +0100 |
| Subject | [PATCH RESEND] perf tools: bug fix, an error of parsing 'man.<tool>.*' config variable. |
| Message-ID | <qOa3D-2Ha-1@gated-at.bofh.it> |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Date | 2016-01-07 09:10 +0100 |
| Subject | Re: [PATCH RESEND] perf tools: bug fix, an error of parsing 'man.<tool>.*' config variable. |
| Message-ID | <qOdNT-5ly-5@gated-at.bofh.it> |
| In reply to | #1303276 |
Hi Taeung,
On Thu, Jan 07, 2016 at 01:00:51PM +0900, Taeung Song wrote:
> 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
Not sure anyone actually uses this..
Anyway, it should be fixed since man viewer code requires it.
>
> So modify iskeychar() function to decide '.' character
> as key character parsing config file.
>
> Cc: Jiri Olsa <jolsa@redhat.com>
> Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Thanks,
Namhyung
> ---
> 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
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web