[PATCH 3/9] perf util: Get rid of write_or_die() from trace-event-info.c

2013-03-21 Thread Namhyung Kim
From: Namhyung Kim Check return value of write and fail if error. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/trace-event-info.c | 180 ++--- tools/perf/util/trace-event.h | 2 +- 2 files changed, 127 inser

Re: [PATCH 3/9] perf util: Get rid of write_or_die() from trace-event-info.c

2013-03-19 Thread Namhyung Kim
On Tue, 19 Mar 2013 16:04:03 +0100, Peter Zijlstra wrote: > On Tue, 2013-03-19 at 10:59 -0400, Steven Rostedt wrote: >> On Tue, 2013-03-19 at 15:49 +0100, Peter Zijlstra wrote: >> > On Tue, 2013-03-19 at 10:35 -0400, Steven Rostedt wrote: >> > > What about: >> > > int err = 0; >> > > >> >

Re: [PATCH 3/9] perf util: Get rid of write_or_die() from trace-event-info.c

2013-03-19 Thread Peter Zijlstra
On Tue, 2013-03-19 at 10:59 -0400, Steven Rostedt wrote: > On Tue, 2013-03-19 at 15:49 +0100, Peter Zijlstra wrote: > > On Tue, 2013-03-19 at 10:35 -0400, Steven Rostedt wrote: > > > What about: > > > int err = 0; > > > > > > err += tracing_data_header(); > > > err += read_

Re: [PATCH 3/9] perf util: Get rid of write_or_die() from trace-event-info.c

2013-03-19 Thread Steven Rostedt
On Tue, 2013-03-19 at 15:49 +0100, Peter Zijlstra wrote: > On Tue, 2013-03-19 at 10:35 -0400, Steven Rostedt wrote: > > What about: > > int err = 0; > > > > err += tracing_data_header(); > > err += read_header_files(); > > [...] > > > > if (err < 0) { > >

Re: [PATCH 3/9] perf util: Get rid of write_or_die() from trace-event-info.c

2013-03-19 Thread Peter Zijlstra
On Tue, 2013-03-19 at 10:35 -0400, Steven Rostedt wrote: > What about: > int err = 0; > > err += tracing_data_header(); > err += read_header_files(); > [...] > > if (err < 0) { > free(tdata); > tdata = NULL; > } > >

Re: [PATCH 3/9] perf util: Get rid of write_or_die() from trace-event-info.c

2013-03-19 Thread Steven Rostedt
On Tue, 2013-03-19 at 17:53 +0900, Namhyung Kim wrote: > struct tracing_data *tracing_data_get(struct list_head *pattrs, > @@ -465,6 +516,7 @@ struct tracing_data *tracing_data_get(struct list_head > *pattrs, > { > struct tracepoint_path *tps; > struct tracing_data *tdata; > + i

[PATCH 3/9] perf util: Get rid of write_or_die() from trace-event-info.c

2013-03-19 Thread Namhyung Kim
From: Namhyung Kim Check return value of write and fail if error. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/trace-event-info.c | 169 + tools/perf/util/trace-event.h | 2 +- 2 files changed, 116 inser