From: John Ferlan Date: Thu, 10 Jan 2019 23:05:12 +0000 (-0500) Subject: qemu: Filter non SCSI hostdevs in qemuHostdevPrepareSCSIDevices X-Git-Tag: v5.0.0-rc2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f30ac207ad96a567ade0d8a49023ade9233b2b72;p=thirdparty%2Flibvirt.git qemu: Filter non SCSI hostdevs in qemuHostdevPrepareSCSIDevices When commit 1d94b3e7 added code to walk the [n]hostdevs list looking to add shared hostdevs, it should've filtered any hostdevs that were not SCSI hostdev's. Signed-off-by: John Ferlan Reviewed-by: Ján Tomko --- diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index a487e1d3aa..4eb3f1d7f1 100644 --- a/src/qemu/qemu_hostdev.c +++ b/src/qemu/qemu_hostdev.c @@ -275,6 +275,9 @@ qemuHostdevPrepareSCSIDevices(virQEMUDriverPtr driver, for (i = 0; i < nhostdevs; i++) { virDomainDeviceDef dev; + if (!virHostdevIsSCSIDevice(hostdevs[i])) + continue; + dev.type = VIR_DOMAIN_DEVICE_HOSTDEV; dev.data.hostdev = hostdevs[i];