From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVGBm-0001D8-7V for qemu-devel@nongnu.org; Tue, 10 Mar 2015 05:10:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVGBk-0000FQ-9v for qemu-devel@nongnu.org; Tue, 10 Mar 2015 05:10:58 -0400 Received: from mail.lekensteyn.nl ([2a02:2308::360:1:25]:52360) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVGBj-0000Eb-Ib for qemu-devel@nongnu.org; Tue, 10 Mar 2015 05:10:55 -0400 Date: Tue, 10 Mar 2015 10:10:49 +0100 From: Peter Wu Message-ID: <20150310091049.GE23387@al> References: <1425971164-9845-1-git-send-email-mjt@msgid.tls.msk.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1425971164-9845-1-git-send-email-mjt@msgid.tls.msk.ru> Subject: Re: [Qemu-devel] [PATCH] block/dmg: make it modular if using additional library List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: qemu-trivial@nongnu.org, Kevin Wolf , qemu-devel@nongnu.org On Tue, Mar 10, 2015 at 10:06:04AM +0300, Michael Tokarev wrote: > block/dmg can use additional library (libbz2) to read > bzip2-compressed files. Make the block driver to be > a module if libbz2 support is requested, to avoid extra > library dependency by default. > > Signed-off-by: Michael Tokarev Tested-by: Peter Wu Reviewed-by: Peter Wu > -- > > This might be questionable, to make the thing to be either > module or built-in depending on build environment, so a > better idea may be to make it modular unconditionally. > This block device format isn't used often. I do not mind making it a module unconditionally, that would make it easier to disable should a security bug come around the corner. Kind regards, Peter > block/Makefile.objs | 3 ++- > configure | 3 +++ > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/block/Makefile.objs b/block/Makefile.objs > index db2933e..440c51f 100644 > --- a/block/Makefile.objs > +++ b/block/Makefile.objs > @@ -1,7 +1,8 @@ > -block-obj-y += raw_bsd.o qcow.o vdi.o vmdk.o cloop.o dmg.o bochs.o vpc.o vvfat.o > +block-obj-y += raw_bsd.o qcow.o vdi.o vmdk.o cloop.o bochs.o vpc.o vvfat.o > block-obj-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o qcow2-cache.o > block-obj-y += qed.o qed-gencb.o qed-l2-cache.o qed-table.o qed-cluster.o > block-obj-y += qed-check.o > +block-obj-$(CONFIG_DMG) += dmg.o > block-obj-$(CONFIG_VHDX) += vhdx.o vhdx-endian.o vhdx-log.o > block-obj-$(CONFIG_QUORUM) += quorum.o > block-obj-y += parallels.o blkdebug.o blkverify.o > diff --git a/configure b/configure > index 7ba4bcb..1dd5721 100755 > --- a/configure > +++ b/configure > @@ -4772,6 +4772,9 @@ fi > if test "$bzip2" = "yes" ; then > echo "CONFIG_BZIP2=y" >> $config_host_mak > echo "BZIP2_LIBS=-lbz2" >> $config_host_mak > + echo "CONFIG_DMG=m" >> $config_host_mak > +else > + echo "CONFIG_DMG=y" >> $config_host_mak > fi > > if test "$libiscsi" = "yes" ; then > -- > 2.1.4 >