diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-05-21 03:50:09 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-05-21 03:50:09 -0400 |
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 5eca52595b62..65fe664fddf6 100644 --- a/tools/perf/util/cache.h +++ b/tools/perf/util/cache.h | |||
@@ -30,7 +30,7 @@ extern const char *pager_program; | |||
30 | extern int pager_in_use(void); | 30 | extern int pager_in_use(void); |
31 | extern int pager_use_color; | 31 | extern int pager_use_color; |
32 | 32 | ||
33 | extern bool use_browser; | 33 | extern int use_browser; |
34 | 34 | ||
35 | #ifdef NO_NEWT_SUPPORT | 35 | #ifdef NO_NEWT_SUPPORT |
36 | static inline void setup_browser(void) | 36 | static inline void setup_browser(void) |
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 { | |||
1068 | void setup_browser(void) | 1068 | void setup_browser(void) |
1069 | { | 1069 | { |
1070 | struct newtPercentTreeColors *c = &defaultPercentTreeColors; | 1070 | struct newtPercentTreeColors *c = &defaultPercentTreeColors; |
1071 | if (!isatty(1)) | 1071 | |
1072 | if (!isatty(1) || !use_browser) { | ||
1073 | setup_pager(); | ||
1072 | return; | 1074 | return; |
1075 | } | ||
1073 | 1076 | ||
1074 | use_browser = true; | 1077 | use_browser = 1; |
1075 | newtInit(); | 1078 | newtInit(); |
1076 | newtCls(); | 1079 | newtCls(); |
1077 | ui_helpline__puts(" "); | 1080 | ui_helpline__puts(" "); |
@@ -1084,7 +1087,7 @@ void setup_browser(void) | |||
1084 | 1087 | ||
1085 | void exit_browser(bool wait_for_ok) | 1088 | void exit_browser(bool wait_for_ok) |
1086 | { | 1089 | { |
1087 | if (use_browser) { | 1090 | if (use_browser > 0) { |
1088 | if (wait_for_ok) { | 1091 | if (wait_for_ok) { |
1089 | char title[] = "Fatal Error", ok[] = "Ok"; | 1092 | char title[] = "Fatal Error", ok[] = "Ok"; |
1090 | newtWinMessage(title, ok, browser__last_msg); | 1093 | newtWinMessage(title, ok, browser__last_msg); |