From: Arnaldo Carvalho de Melo Date: Sun, 16 May 2010 00:06:58 +0000 (-0300) Subject: perf newt: Exit browser unconditionally when CTRL+C, q or Q is pressed X-Git-Tag: v2.6.35-rc1~522^2~13 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=29351db6a05e7e42be457569428425520a18beec;p=~emulex%2Finfiniband.git perf newt: Exit browser unconditionally when CTRL+C, q or Q is pressed ESC still asks for confirmation. Suggested-by: Ingo Molnar Cc: Frédéric Weisbecker Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Tom Zanussi LKML-Reference: Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c index 094887f45d0..139eb1a16cd 100644 --- a/tools/perf/util/newt.c +++ b/tools/perf/util/newt.c @@ -837,9 +837,10 @@ int hists__browse(struct hists *self, const char *helpline, const char *input_na if (es.reason == NEWT_EXIT_HOTKEY) { if (toupper(es.u.key) == 'A') goto do_annotate; - if (es.u.key == NEWT_KEY_ESCAPE || - toupper(es.u.key) == 'Q' || - es.u.key == CTRL('c')) { + if (toupper(es.u.key) == 'Q' || + es.u.key == CTRL('c')) + break; + if (es.u.key == NEWT_KEY_ESCAPE) { if (dialog_yesno("Do you really want to exit?")) break; else