lkml.org 
[lkml]   [2013]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tools/perf/util: Document and clean up readn() a bit
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 all or nothing interface.

all the users either checks the returned value with the size
or do (ret < 0) and fail

and one instance in the read_attr does not check anything and
blindly hopes it will read all ;-)

I have similar patch that also change callers to use proper
ssize_t instead of int.. I can rebase and send it separately
or combine it with yours.. let me know

jirka


\
 
 \ /
  Last update: 2013-11-27 17:41    [W:0.066 / U:0.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site