Re: [PATCH] tools/perf/util: Document and clean up readn() a bit

2013-11-27 Thread Ingo Molnar
* Jiri Olsa wrote: > On Wed, Nov 27, 2013 at 08:19:13AM -0700, David Ahern wrote: > > On 11/27/13, 4:57 AM, Ingo Molnar wrote: > > >Okay, I thought this was an intentional 'all or nothing' interface - > > >but looking at the readn() users they can tolerate partial results > > >just fine. > > >

Re: [PATCH] tools/perf/util: Document and clean up readn() a bit

2013-11-27 Thread Jiri Olsa
On Wed, Nov 27, 2013 at 08:19:13AM -0700, David Ahern wrote: > On 11/27/13, 4:57 AM, Ingo Molnar wrote: > >Okay, I thought this was an intentional 'all or nothing' interface - > >but looking at the readn() users they can tolerate partial results > >just fine. > > I believe that is the intent -- an

Re: [PATCH] tools/perf/util: Document and clean up readn() a bit

2013-11-27 Thread David Ahern
On 11/27/13, 4:57 AM, Ingo Molnar wrote: Okay, I thought this was an intentional 'all or nothing' interface - but looking at the readn() users they can tolerate partial results just fine. I believe that is the intent -- an all or nothing interface. David -- To unsubscribe from this list: send

Re: [PATCH] tools/perf/util: Document and clean up readn() a bit

2013-11-27 Thread Ingo Molnar
* Adrian Hunter wrote: > On 26/11/13 19:53, Ingo Molnar wrote: > > > > * Arnaldo Carvalho de Melo wrote: > > > >> Em Fri, Nov 22, 2013 at 03:24:26PM +0100, Jiri Olsa escreveu: > >>> } > >>> + > >>> +ssize_t perf_data_file__write(struct perf_data_file *file, > >>> + void

Re: [PATCH] tools/perf/util: Document and clean up readn() a bit

2013-11-27 Thread Adrian Hunter
On 26/11/13 19:53, Ingo Molnar wrote: > > * Arnaldo Carvalho de Melo wrote: > >> Em Fri, Nov 22, 2013 at 03:24:26PM +0100, Jiri Olsa escreveu: >>> } >>> + >>> +ssize_t perf_data_file__write(struct perf_data_file *file, >>> + void *buf, size_t size) >>> +{ >>> + ssize_t

[PATCH] tools/perf/util: Document and clean up readn() a bit

2013-11-26 Thread Ingo Molnar
* Arnaldo Carvalho de Melo wrote: > Em Fri, Nov 22, 2013 at 03:24:26PM +0100, Jiri Olsa escreveu: > > } > > + > > +ssize_t perf_data_file__write(struct perf_data_file *file, > > + void *buf, size_t size) > > +{ > > + ssize_t total = size; > > + > > + while (size) { >