From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR6JK-0002nh-NF for qemu-devel@nongnu.org; Fri, 21 Mar 2014 16:45:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WR6JF-0002sV-O7 for qemu-devel@nongnu.org; Fri, 21 Mar 2014 16:45:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42885) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR6JF-0002sH-FP for qemu-devel@nongnu.org; Fri, 21 Mar 2014 16:44:57 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2LKiuvw008789 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 21 Mar 2014 16:44:56 -0400 Message-ID: <532CA4C7.8060204@redhat.com> Date: Fri, 21 Mar 2014 14:44:55 -0600 From: Eric Blake MIME-Version: 1.0 References: <1395430254-14291-1-git-send-email-dgilbert@redhat.com> In-Reply-To: <1395430254-14291-1-git-send-email-dgilbert@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="NcwQSx5KhesXi2IGfa762kHvtBHqS20Aa" Subject: Re: [Qemu-devel] [PATCH v2 1/1] Make qemu_peek_buffer loop until it gets it's data List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert (git)" , qemu-devel@nongnu.org Cc: quintela@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --NcwQSx5KhesXi2IGfa762kHvtBHqS20Aa Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/21/2014 01:30 PM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" >=20 > Make qemu_peek_buffer repatedly call fill_buffer until it gets > all the data it requires, or until there is an error. >=20 > At the moment, qemu_peek_buffer will try one qemu_fill_buffer if ther= e > 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. >=20 > 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --NcwQSx5KhesXi2IGfa762kHvtBHqS20Aa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTLKTHAAoJEKeha0olJ0NqMQ0H/iIxCGsulbHVJNDnTHRYskE4 5v088afJamYcFxUpnZRdlrHzYDkCeLs57E8H+sONw0z5SJcYllyBz0zlNTNuiaE7 ZiTMJ4rh6IoeWuy9KENncqjm6u2dI6RHmQJz2hB2bdiQCOxd/LgcYW7ZXegH9dU1 CCuwxHyX0J5g6f06KvX/wC04bVllDV38dLRS6x6AuKT0k1M7AdTVffNbEtAVYA9i JgEiqWt5UerOUfMUdMFxI/RyVQtThy5F/Lsg56Iipmyr9eUzDASGwNuGetNTebds BvRspPy3T+kdyC31x3TmGVQ30f1VHdV+tquclfnoDSBYt3T3aHopZoZ8a5OeTl0= =M2aw -----END PGP SIGNATURE----- --NcwQSx5KhesXi2IGfa762kHvtBHqS20Aa--