- force virtio-blk usage only if the guest kernel has no virtio-scsi

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=92
This commit is contained in:
Olaf Hering 2012-09-13 12:54:57 +00:00 committed by Git OBS Bridge
parent c0cdbdd21e
commit b373555d5f
2 changed files with 17 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Sep 13 14:53:39 CEST 2012 - ohering@suse.de
- force virtio-blk usage only if the guest kernel has no virtio-scsi
-------------------------------------------------------------------
Thu Sep 13 10:39:54 CEST 2012 - ohering@suse.de

View File

@ -339,8 +339,18 @@ virtual machines.
export vmchannel_test=no
export QEMU=/usr/bin/qemu-kvm
# for configure macro below
CFLAGS="$RPM_OPT_FLAGS -Wno-unused -DGUESTFS_QEMU_NO_VIRTIO_BLK"
CXXFLAGS="$RPM_OPT_FLAGS -Wno-unused -DGUESTFS_QEMU_NO_VIRTIO_BLK"
CFLAGS="$RPM_OPT_FLAGS -Wno-unused"
CXXFLAGS="$RPM_OPT_FLAGS -Wno-unused"
# If the kernel happens to have no virtio-scsi force virtio-blk usage in the tools
# This is true for kernel.rpm included in 12.1 and older
if /sbin/modinfo -k `/sbin/get_kernel_version /boot/vmlinuz` virtio-scsi
then
: use virtio-scsi, which is the default in libguestfs
else
CFLAGS="$CFLAGS -DGUESTFS_QEMU_NO_VIRTIO_BLK"
CXXFLAGS="$CXXFLAGS -DGUESTFS_QEMU_NO_VIRTIO_BLK"
fi
#
autoreconf -fi
%configure \
--help || :