aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/perf.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-03-22 12:10:25 -0400
committerIngo Molnar <mingo@elte.hu>2010-03-22 13:47:34 -0400
commitf3a1f0ea9432ec395cd112f42201e8e523c07bc5 (patch)
treedcf78714e7531f35c008de90de55e11c512310ef /tools/perf/perf.c
parent301fde27c7fcd0380b02b175d547e894ff65d78a (diff)
perf newt: Properly restore the screen when error exiting
Show an OK message box with the last message sent via pr_err, etc. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <1269274229-20442-1-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/perf.c')
-rw-r--r--tools/perf/perf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index d2de8393a33c..2826e702986e 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -264,11 +264,11 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
264 set_debugfs_path(); 264 set_debugfs_path();
265 265
266 status = p->fn(argc, argv, prefix); 266 status = p->fn(argc, argv, prefix);
267 exit_browser(status);
268
267 if (status) 269 if (status)
268 return status & 0xff; 270 return status & 0xff;
269 271
270 exit_browser();
271
272 /* Somebody closed stdout? */ 272 /* Somebody closed stdout? */
273 if (fstat(fileno(stdout), &st)) 273 if (fstat(fileno(stdout), &st))
274 return 0; 274 return 0;