aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-11-19 14:55:56 -0200
committerIngo Molnar <mingo@elte.hu>2009-11-19 18:47:17 +0100
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 c97cb2ca8fa..87f98fdb051 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)
}
}
- if (file_new)
- perf_header__write(header, output, false);
+ if (file_new) {
+ err = perf_header__write(header, output, false);
+ if (err < 0)
+ return err;
+ }
if (!system_wide)
event__synthesize_thread(pid, process_synthesized_event);