From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBsXc-0005rd-ST for qemu-devel@nongnu.org; Mon, 28 Jul 2014 17:33:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBsXY-0008Hf-FQ for qemu-devel@nongnu.org; Mon, 28 Jul 2014 17:33:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3321) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBsXY-0008HN-8o for qemu-devel@nongnu.org; Mon, 28 Jul 2014 17:33:04 -0400 Message-ID: <53D6C189.8090309@redhat.com> Date: Mon, 28 Jul 2014 15:32:57 -0600 From: Eric Blake MIME-Version: 1.0 References: <1406302776-2306-1-git-send-email-sanidhya.iiith@gmail.com> <1406302776-2306-2-git-send-email-sanidhya.iiith@gmail.com> In-Reply-To: <1406302776-2306-2-git-send-email-sanidhya.iiith@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Iud0mejlViXcA2u7tppGaKxVgA4Ownm3C" Subject: Re: [Qemu-devel] [PATCH RFC v2 01/12] QEMUSizedBuffer/QEMUFile List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sanidhya Kashyap , qemu list Cc: Joel Schopp , Juan Quintela , "Dr. David Alan Gilbert" , Stefan Berger This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Iud0mejlViXcA2u7tppGaKxVgA4Ownm3C Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/25/2014 09:39 AM, Sanidhya Kashyap wrote: > From: "Dr. David Alan Gilbert" >=20 > Stefan Berger's to create a QEMUFile that goes to a memory buffer; Missing something. Maybe you meant: This is based on Stefan Berger's patch to create ... > from: >=20 > http://lists.gnu.org/archive/html/qemu-devel/2013-03/msg05036.html >=20 > Using the QEMUFile interface, this patch adds support functions for > operating > on in-memory sized buffers that can be written to or read from. Odd line breaking. >=20 > Signed-off-by: Stefan Berger > Signed-off-by: Joel Schopp Still looks weird to have David as author but not listed in S-o-B. > --- > include/migration/qemu-file.h | 27 +++ > qemu-file.c | 411 ++++++++++++++++++++++++++++++++++= ++++++++ > 2 files changed, 438 insertions(+) >=20 > +/** > + * Set the length of the buffer; The primary usage of this s/The/the/ > + * function is to truncate the number of used bytes in the buffer. > + * The size will not be extended beyond the current number of no need for double space > + * allocated bytes in the QEMUSizedBuffer. > + * > + * @qsb: A QEMUSizedBuffer > + * @new_len : The new length of bytes in the buffer > + * > + * Returns the number of bytes the buffer was trucated or extended s/trucated/truncated/ > + > +QEMUFile *qemu_bufopen(const char *mode, QEMUSizedBuffer *input) > +{ > + QEMUBuffer *s; > + > + if (mode =3D=3D NULL || (mode[0] !=3D 'r' && mode[0] !=3D 'w') || = mode[1] !=3D 0) { > + fprintf(stderr, "qemu_bufopen: Argument validity check failed\= n"); Should this function be directly printing to stderr, or should it be converted to use Error **errp semantics? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Iud0mejlViXcA2u7tppGaKxVgA4Ownm3C 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 iQEcBAEBCAAGBQJT1sGJAAoJEKeha0olJ0NqUdcIAIlm0Y8vQGuZ7TcLyWNGaKSM 2/FepFC/SBCBJwV4izFoQUtw0AJXNAH7PqYsxZbcDPYgwnOqmoCU3nsKWanfKzSG ddgMulAbgM2rFxOYlq4CqPESE8oGqwazuUDn7bIdqDYxHj7zHiWThuASB92L4IsZ igrV3cNo4T5uoay0fAkoJSR+SVptHOeFUluLYYGKs8vXyo65Sjx/ORHUflD0/iaB FdPdGemJBmOPz5XW5iZcVdxFzW+gfaPjaUWjaxx3jgdpTNWNHxBDMDPDzXRF1X9f YGLfyKBlbQ7rn3Noaun1+eWV1LxOqNYUY4X7Sr8gKQ+e0mOcaOLqY4VkXMuy+JE= =9jYl -----END PGP SIGNATURE----- --Iud0mejlViXcA2u7tppGaKxVgA4Ownm3C--