All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>,
	qemu-devel@nongnu.org
Cc: quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 1/1] Make qemu_peek_buffer loop until it gets it's data
Date: Fri, 21 Mar 2014 14:44:55 -0600	[thread overview]
Message-ID: <532CA4C7.8060204@redhat.com> (raw)
In-Reply-To: <1395430254-14291-1-git-send-email-dgilbert@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1104 bytes --]

On 03/21/2014 01:30 PM, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> 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.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2014-03-21 20:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-21 19:30 [Qemu-devel] [PATCH v2 1/1] Make qemu_peek_buffer loop until it gets it's data Dr. David Alan Gilbert (git)
2014-03-21 20:44 ` Eric Blake [this message]
2014-03-24  9:52   ` Dr. David Alan Gilbert
2014-03-24 13:16     ` Eric Blake
2014-03-26 16:48 ` Markus Armbruster
2014-03-26 17:18   ` Dr. David Alan Gilbert
2014-03-27  8:16     ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=532CA4C7.8060204@redhat.com \
    --to=eblake@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.