diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/ui/tui/helpline.c | 3 | ||||
-rw-r--r-- | tools/perf/ui/tui/setup.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/ui/tui/helpline.c b/tools/perf/ui/tui/helpline.c index 1c8b9afd5d6e..88f5143a5981 100644 --- a/tools/perf/ui/tui/helpline.c +++ b/tools/perf/ui/tui/helpline.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include "../libslang.h" | 9 | #include "../libslang.h" |
10 | 10 | ||
11 | char ui_helpline__last_msg[1024]; | 11 | char ui_helpline__last_msg[1024]; |
12 | bool tui_helpline__set; | ||
12 | 13 | ||
13 | static void tui_helpline__pop(void) | 14 | static void tui_helpline__pop(void) |
14 | { | 15 | { |
@@ -35,6 +36,8 @@ static int tui_helpline__show(const char *format, va_list ap) | |||
35 | sizeof(ui_helpline__last_msg) - backlog, format, ap); | 36 | sizeof(ui_helpline__last_msg) - backlog, format, ap); |
36 | backlog += ret; | 37 | backlog += ret; |
37 | 38 | ||
39 | tui_helpline__set = true; | ||
40 | |||
38 | if (ui_helpline__last_msg[backlog - 1] == '\n') { | 41 | if (ui_helpline__last_msg[backlog - 1] == '\n') { |
39 | ui_helpline__puts(ui_helpline__last_msg); | 42 | ui_helpline__puts(ui_helpline__last_msg); |
40 | SLsmg_refresh(); | 43 | SLsmg_refresh(); |
diff --git a/tools/perf/ui/tui/setup.c b/tools/perf/ui/tui/setup.c index 3c38f25b1695..b77e1d771363 100644 --- a/tools/perf/ui/tui/setup.c +++ b/tools/perf/ui/tui/setup.c | |||
@@ -17,6 +17,7 @@ | |||
17 | static volatile int ui__need_resize; | 17 | static volatile int ui__need_resize; |
18 | 18 | ||
19 | extern struct perf_error_ops perf_tui_eops; | 19 | extern struct perf_error_ops perf_tui_eops; |
20 | extern bool tui_helpline__set; | ||
20 | 21 | ||
21 | extern void hist_browser__init_hpp(void); | 22 | extern void hist_browser__init_hpp(void); |
22 | 23 | ||
@@ -159,7 +160,7 @@ out: | |||
159 | 160 | ||
160 | void ui__exit(bool wait_for_ok) | 161 | void ui__exit(bool wait_for_ok) |
161 | { | 162 | { |
162 | if (wait_for_ok) | 163 | if (wait_for_ok && tui_helpline__set) |
163 | ui__question_window("Fatal Error", | 164 | ui__question_window("Fatal Error", |
164 | ui_helpline__last_msg, | 165 | ui_helpline__last_msg, |
165 | "Press any key...", 0); | 166 | "Press any key...", 0); |