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 <m...@tls.msk.ru>
Tested-by: Peter Wu <pe...@lekensteyn.nl> Reviewed-by: Peter Wu <pe...@lekensteyn.nl> > -- > > 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 >