diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-05-21 09:50:09 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-05-21 09:50:09 +0200 |
commit | 1c34bde13a3cdcd4c7c6322f8052e67c2c91caf1 (patch) | |
tree | 3be33fd17c7b3101acb638771075cf6681334c36 /tools/perf/util | |
parent | 915e555822629421d97f851c6b87bf4c314ed8c9 (diff) | |
parent | 5d06e6915b1b76653e6fe3369b0b18fdbf75f0a5 (diff) |
Merge branch 'perf' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/core
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/cache.h | 2 | ||||
-rw-r--r-- | tools/perf/util/newt.c | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h index 5eca52595b6..65fe664fddf 100644 --- a/tools/perf/util/cache.h +++ b/tools/perf/util/cache.h @@ -30,7 +30,7 @@ extern const char *pager_program; extern int pager_in_use(void); extern int pager_use_color; -extern bool use_browser; +extern int use_browser; #ifdef NO_NEWT_SUPPORT static inline void setup_browser(void) diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c index 051022eb5f4..0b45658f749 100644 --- a/tools/perf/util/newt.c +++ b/tools/perf/util/newt.c @@ -1068,10 +1068,13 @@ static struct newtPercentTreeColors { void setup_browser(void) { struct newtPercentTreeColors *c = &defaultPercentTreeColors; - if (!isatty(1)) + + if (!isatty(1) || !use_browser) { + setup_pager(); return; + } - use_browser = true; + use_browser = 1; newtInit(); newtCls(); ui_helpline__puts(" "); @@ -1084,7 +1087,7 @@ void setup_browser(void) void exit_browser(bool wait_for_ok) { - if (use_browser) { + if (use_browser > 0) { if (wait_for_ok) { char title[] = "Fatal Error", ok[] = "Ok"; newtWinMessage(title, ok, browser__last_msg); |