Skip to contentSkip to conversation

perf config: Allow '_' in config file variable names

tip:perf/urgent tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message May 30, 2012 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  8dc7c651dd7d95b548adef8cd56908392d3ba432
Gitweb:     http://git.kernel.org/tip/8dc7c651dd7d95b548adef8cd56908392d3ba432
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Tue, 29 May 2012 21:59:02 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Tue, 29 May 2012 21:59:02 -0300

perf config: Allow '_' in config file variable names

For annotate I want to be able to have variables that are the same as the ones representing feature toggles.

Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
---
 tools/perf/util/config.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/perf/util/config.c +1 -1
index 0deac6a..6faa3a1 100644
@@ -120,7 +120,7 @@ static char *parse_value(void)
 
 static inline int iskeychar(int c)
 {
-	return isalnum(c) || c == '-';
+	return isalnum(c) || c == '-' || c == '_';
 }
 
 static int get_value(config_fn_t fn, void *data, char *name, unsigned int len)