From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvaBD-0000ni-Qj for qemu-devel@nongnu.org; Mon, 22 Aug 2011 15:29:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QvaBC-0007Lu-R9 for qemu-devel@nongnu.org; Mon, 22 Aug 2011 15:29:03 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:58539) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvaBC-0007Lq-Oi for qemu-devel@nongnu.org; Mon, 22 Aug 2011 15:29:02 -0400 Received: by yxt3 with SMTP id 3so4435013yxt.4 for ; Mon, 22 Aug 2011 12:29:02 -0700 (PDT) Message-ID: <4E52ADFC.5070506@redhat.com> Date: Mon, 22 Aug 2011 14:29:00 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1314032798-21423-1-git-send-email-smizrahi@redhat.com> <1314032798-21423-2-git-send-email-smizrahi@redhat.com> In-Reply-To: <1314032798-21423-2-git-send-email-smizrahi@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] Added target to build libvdisk List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Saggi Mizrahi Cc: qemu-devel@nongnu.org On 08/22/2011 12:06 PM, Saggi Mizrahi wrote: > libvdisk is a library that packages qemu's handling of disk images. This > allows for other programs to link to it and get access to qemu image > file abstractions. > > To use install the lib and #include > all the bdrv_* functions work as expected. > > Signed-off-by: Saggi Mizrahi It's a good idea in principle but the approach is far too naive. The block layer needs a good bit of modularization first. Test cases need to be written, and most importantly, using the library shouldn't require writing a bunch of dummy functions. Regards, Anthony Liguori > --- > .gitignore | 4 ++-- > Makefile.objs | 9 +++++++++ > 2 files changed, 11 insertions(+), 2 deletions(-) > > diff --git a/.gitignore b/.gitignore > index 59c343c..a389059 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -1,5 +1,4 @@ > -config-devices.* > -config-all-devices.* > +config-devices.* config-all-devices.* > config-host.* > config-target.* > trace.h > @@ -15,6 +14,7 @@ libdis* > libhw32 > libhw64 > libuser > +libvdisk > qapi-generated > qemu-doc.html > qemu-tech.html > diff --git a/Makefile.objs b/Makefile.objs > index 432b619..291f194 100644 > --- a/Makefile.objs > +++ b/Makefile.objs > @@ -171,6 +171,15 @@ common-obj-$(CONFIG_XEN_BACKEND) += xen_backend.o xen_devconfig.o > common-obj-$(CONFIG_XEN_BACKEND) += xen_console.o xenfb.o xen_disk.o xen_nic.o > > ###################################################################### > +# libvdisk > + > +vdisk-obj-y = $(block-obj-y) > + > +vdisk-obj-y += qemu-tool.o qemu-error.o > +vdisk-obj-y += $(oslib-obj-y) $(trace-obj-y) $(block-obj-y) > +vdisk-obj-y += $(qobject-obj-y) $(version-obj-y) qemu-timer-common.o > + > +###################################################################### > # libuser > > user-obj-y =