summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/newt.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-05-21 09:50:09 +0200
committerIngo Molnar <mingo@elte.hu>2010-05-21 09:50:09 +0200
commit1c34bde13a3cdcd4c7c6322f8052e67c2c91caf1 (patch)
tree3be33fd17c7b3101acb638771075cf6681334c36 /tools/perf/util/newt.c
parentMerge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/fre... (diff)
parentperf tui: Allow disabling the TUI on a per command basis in ~/.perfconfig (diff)
downloadlinux-1c34bde13a3cdcd4c7c6322f8052e67c2c91caf1.tar.xz
linux-1c34bde13a3cdcd4c7c6322f8052e67c2c91caf1.zip
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/newt.c')
-rw-r--r--tools/perf/util/newt.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c
index 051022eb5f43..0b45658f7497 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);