From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8XWm-00059I-7g for qemu-devel@nongnu.org; Mon, 03 Sep 2012 10:21:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8XWg-00075r-CZ for qemu-devel@nongnu.org; Mon, 03 Sep 2012 10:21:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49573) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8XWg-00075n-4H for qemu-devel@nongnu.org; Mon, 03 Sep 2012 10:21:18 -0400 Message-ID: <5044BC9B.3090901@redhat.com> Date: Mon, 03 Sep 2012 08:20:11 -0600 From: Eric Blake MIME-Version: 1.0 References: <1346663926-20188-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1346663926-20188-3-git-send-email-xiawenc@linux.vnet.ibm.com> In-Reply-To: <1346663926-20188-3-git-send-email-xiawenc@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig36B621B96FFA55BEB1D66939" Subject: Re: [Qemu-devel] [PATCH 2/6] libqblock public type defines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: kwolf@redhat.com, pbonzini@redhat.com, aliguori@us.ibm.com, qemu-devel@nongnu.org, stefanha@gmail.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig36B621B96FFA55BEB1D66939 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09/03/2012 03:18 AM, Wenchao Xia wrote: > This patch contains public type and defines used in APIs. >=20 > Signed-off-by: Wenchao Xia > --- > libqblock/libqblock-types.h | 228 +++++++++++++++++++++++++++++++++++= ++++++++ > 1 files changed, 228 insertions(+), 0 deletions(-) > create mode 100644 libqblock/libqblock-types.h >=20 > diff --git a/libqblock/libqblock-types.h b/libqblock/libqblock-types.h > new file mode 100644 > index 0000000..3389bda > --- /dev/null > +++ b/libqblock/libqblock-types.h > @@ -0,0 +1,228 @@ > +#ifndef LIBQBLOCK_TYPES_H Missing a copyright header. Shame. > +#define LIBQBLOCK_TYPES_H > + > +#include > +#include > +#include > +#include I see use of stdint (uint8_t) and stdbool (bool), but isn't better than and for size_t? > + > +/** > + * QBlockInfoImageStatic: information about the block image. > + * > + * @loc: location info. > + * @fmt_type: format type. > + * @virt_size: virtual size in bytes. > + * @backing_loc: backing file location, its type is QB_PROT_NONE if no= t exist. > + * @allocated_size: allocated size in bytes, negative if not available= =2E Reading this... > + * @encrypt: encrypt flag. > + */ > +struct QBlockInfoImageStatic { > + struct QBlockOptionLoc loc; > + enum QBlockFormat fmt_type; > + size_t virt_size; > + /* advance info */ > + struct QBlockOptionLoc backing_loc; > + size_t allocated_size; =2E..negative is not possible for size_t. Did you mean ssize_t? --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig36B621B96FFA55BEB1D66939 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.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQEcBAEBCAAGBQJQRLycAAoJEKeha0olJ0Nqs6YH/3hU7nz9omhBZSAvZvd8u+Vi UgOl/D1W+JE/UUdiA/dUyLz/XBvHMAtYVdxpoU4wJcalCULTk569rIUJsP7T5JgA r3vTH7gxR4Gkyo8+BKb+BT4VEtfJEZ3x81WTfXw7rsgALdNGTIV/T1qVZwnpts15 CGm4MlQw4GDZUZ1Cz9Fx7etrXokY7myhSPGq25YvwVeAM+xIoMNld5/3iFGhc879 xEN4GNsBBCWFngPK3j2E4ZBPzBoi4KD6/EliSS3+W3JctICdW9k6XlUD8UcxcIY1 bWr4UQm8PudttMABjcCXhYcEdd4Wt+7xb229K5ommNz+7aBCGEdWkLvwMuOTb+E= =AsUR -----END PGP SIGNATURE----- --------------enig36B621B96FFA55BEB1D66939--