On 09/03/2012 03:18 AM, Wenchao Xia wrote: > This patch contains public type and defines used in APIs. > > Signed-off-by: Wenchao Xia > --- > libqblock/libqblock-types.h | 228 +++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 228 insertions(+), 0 deletions(-) > create mode 100644 libqblock/libqblock-types.h > > 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 not exist. > + * @allocated_size: allocated size in bytes, negative if not available. 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; ...negative is not possible for size_t. Did you mean ssize_t? -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org