[PATCH 7/8] perf ui tui: Register the error callbacks before initializing the widgets

From: Arnaldo Carvalho de Melo
Date: Thu Oct 22 2015 - 18:16:07 EST


From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

I.e. we want to tell the user about errors found during, for instance,
the ui_browser initialization, so that a call to ui__warning() appears
as a window waiting for a key to be pressed.

Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
Cc: Wang Nan <wangnan0@xxxxxxxxxx>
Link: http://lkml.kernel.org/n/tip-ederrwizcl6mfz10vfobl5qq@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/ui/tui/setup.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/perf/ui/tui/setup.c b/tools/perf/ui/tui/setup.c
index 60d1f29b4b50..7dfeba0a91f3 100644
--- a/tools/perf/ui/tui/setup.c
+++ b/tools/perf/ui/tui/setup.c
@@ -141,10 +141,6 @@ int ui__init(void)

SLkp_define_keysym((char *)"^(kB)", SL_KEY_UNTAB);

- ui_helpline__init();
- ui_browser__init();
- tui_progress__init();
-
signal(SIGSEGV, ui__signal_backtrace);
signal(SIGFPE, ui__signal_backtrace);
signal(SIGINT, ui__signal);
@@ -153,6 +149,10 @@ int ui__init(void)

perf_error__register(&perf_tui_eops);

+ ui_helpline__init();
+ ui_browser__init();
+ tui_progress__init();
+
hist_browser__init_hpp();
out:
return err;
--
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/