qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 1/1] Make qemu_peek_buffer loop until it gets


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [PATCH v2 1/1] Make qemu_peek_buffer loop until it gets it's data
Date: Mon, 24 Mar 2014 09:52:22 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

* Eric Blake (address@hidden) wrote:
> On 03/21/2014 01:30 PM, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert" <address@hidden>
> > 
> > Make qemu_peek_buffer repatedly call fill_buffer until it gets
> > all the data it requires, or until there is an error.
> > 
> >   At the moment, qemu_peek_buffer will try one qemu_fill_buffer if there
> >   isn't enough data waiting, however the kernel is entitled to return
> >   just a few bytes, and still leave qemu_peek_buffer with less bytes
> >   than it needed.  I've seen this fail in a dev world, and I think it
> >   could theoretically fail in the peeking of the subsection headers in
> >   the current world.
> > 
> > Comment qemu_peek_byte to point out it's not guaranteed to work for
> 
> > +/*
> > + * Attempt to fill the buffer from the underlying file
> > + * Returns the number of bytes read, or -ve value for an error.
> 
> s/-ve/negative/ - it is not an obvious abbreviation, and I only knew
> what it meant because you have been told to fix it in other patches.

If I need to recut it for another reason I'll change it.
However, it's a perfectly common abbreviation that's widely used
(hundreds of times in the kernel source for example).

Dave
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

[Prev in Thread] Current Thread [Next in Thread]