From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFsqo-0001sl-PN for qemu-devel@nongnu.org; Wed, 13 Mar 2013 17:04:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFsqk-0000YM-KY for qemu-devel@nongnu.org; Wed, 13 Mar 2013 17:04:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29583) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFsqk-0000Wg-BS for qemu-devel@nongnu.org; Wed, 13 Mar 2013 17:04:38 -0400 Message-ID: <5140E9CE.7080902@redhat.com> Date: Wed, 13 Mar 2013 15:04:14 -0600 From: Eric Blake MIME-Version: 1.0 References: <1363200988-17865-1-git-send-email-jschopp@linux.vnet.ibm.com> <1363200988-17865-4-git-send-email-jschopp@linux.vnet.ibm.com> In-Reply-To: <1363200988-17865-4-git-send-email-jschopp@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2GQADHHLTMUVIVHFSDCJW" Subject: Re: [Qemu-devel] [PATCH 3/9] two new file wrappers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Joel Schopp Cc: Michael Tsirkin , qemu-devel@nongnu.org, Stefan Berger This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2GQADHHLTMUVIVHFSDCJW Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/13/2013 12:56 PM, Joel Schopp wrote: > Add a 3 very short file wrapper functions to make code that follows mor= e s/a 3/3/ > readable. Also export an existing function that is currently static. >=20 > Cc: Michael Tsirkin > Signed-off-by: Stefan Berger > Signed-off-by: Joel Schopp > --- > include/migration/qemu-file.h | 3 +++ > util/qemu-file.c | 30 ++++++++++++++++++++++++++++++ > 2 files changed, 33 insertions(+) >=20 > + > +int qemu_peek_bytes(QEMUFile *f, uint8_t *buf, int size, size_t offset= ) Should we be using off_t instead of size_t for offset; and size_t instead of int for size (which implies ssize_t for return value)? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2GQADHHLTMUVIVHFSDCJW 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.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRQOnOAAoJEKeha0olJ0NqqVsH/jlFcFQwj7hUEjl/SV+QTc95 bux4rwsix4mKYa6MCN/SYtC5uXz72Lqx1S2YoQfum1bIZoy3BZYMgqWUYolFLbZh Ks3Mq8JfKehi6m5Ny08T6fZCwOAhyAelJEWdY1L8TbzBiEx+5oIlNVO3He6rZ3Xq Eu7Z2tU56fJpa26IK9FjcdpjTvCclmY/4jeHXwfM2AbWp+R6GuU+E5+8rDbMERDY 8v+ZaGiju6pDw3ysZD+KUHn8rLqBCsRIaZkfalxWxcEch60gKupY6qC8Om6ENmmb m/h8VsdeQqHK2p3ma1LRh8+wEhEJ8p/iyxjUbfGhlnRKS8z3/T12RumH1UZE094= =HlSz -----END PGP SIGNATURE----- ------enig2GQADHHLTMUVIVHFSDCJW--