Re: [Qemu-devel] [PATCH V19 08/10] libqblock: libqblock API implement

2013-02-21 Thread Stefan Hajnoczi
On Sat, Feb 16, 2013 at 10:48:15AM +0800, Wenchao Xia wrote: > +static int create_context(QBlockContext **p_context) > +{ > +/* > + * library init comes here, to make sure block_init is called before with > + * flag __attribute__((constructor)). > + */ > +if (pthread_mutex_lock(

[Qemu-devel] [PATCH V19 08/10] libqblock: libqblock API implement

2013-02-15 Thread Wenchao Xia
This patch contains implemention for APIs. Basically it is a layer above qemu block general layer now. qb_image_new() will try do init for this library. Signed-off-by: Wenchao Xia --- libqblock/libqblock-error.c | 49 +++ libqblock/libqblock.c | 983 +