aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-05-27 08:53:40 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-05-27 08:53:40 -0400
commitc4fe52a8ee730ed340eba8fe6ccbf26347ebe9aa (patch)
tree84af3dc87ba3b1ef71ec94275fc94dbcfc0d4b10
parent5ad90e4ea4a096af9f0a362e34dfae5686a191ef (diff)
perf tui: Fix last use_browser problem related to .perfconfig
When we moved to using ~/.perfconfig to set the value of use_browser, it changed from a boolean to an int so that the convention used for use_pager was followed. That convention is: -1: unspecified, that is what use_{browser,pager} is initialized 0: Don't use the browser (should be TUI), because was explicitely set to 0/off/false on ~/.perfconfig [tui] cmd =, or because we're redirecting the stdout to a file or piping it to some other command (!isatty()). 1: Use the TUI Some code was not properly audited and continued testing it as a boolean, this seems to be the last one. Reported-by: Frédéric Weisbecker <fweisbec@gmail.com> Tested-by: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/util/debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c
index dd824cf3b628..6cddff2bc970 100644
--- a/tools/perf/util/debug.c
+++ b/tools/perf/util/debug.c
@@ -22,7 +22,7 @@ int eprintf(int level, const char *fmt, ...)
22 22
23 if (verbose >= level) { 23 if (verbose >= level) {
24 va_start(args, fmt); 24 va_start(args, fmt);
25 if (use_browser) 25 if (use_browser > 0)
26 ret = browser__show_help(fmt, args); 26 ret = browser__show_help(fmt, args);
27 else 27 else
28 ret = vfprintf(stderr, fmt, args); 28 ret = vfprintf(stderr, fmt, args);