aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-11-19 11:55:56 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-19 12:47:17 -0500
commitd5eed904bb6010b429b82c47e7cdb6a32f0c1343 (patch)
tree2d9da285a0c9a67acc2ed6c2fa647986b4bdd896 /tools/perf/builtin-record.c
parent4dc0a04bb18fe9b80cefa08694f46a3a19ebfe50 (diff)
perf tools: Eliminate some more die() uses in library functions
This time in perf_header__adds_write, propagating the do_write error returns. 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: <1258649757-17554-2-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index c97cb2ca8fa4..87f98fdb0513 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -474,8 +474,11 @@ static int __cmd_record(int argc, const char **argv)
474 } 474 }
475 } 475 }
476 476
477 if (file_new) 477 if (file_new) {
478 perf_header__write(header, output, false); 478 err = perf_header__write(header, output, false);
479 if (err < 0)
480 return err;
481 }
479 482
480 if (!system_wide) 483 if (!system_wide)
481 event__synthesize_thread(pid, process_synthesized_event); 484 event__synthesize_thread(pid, process_synthesized_event);