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 <jferlan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
John Ferlan 2019-01-10 18:05:12 -05:00
parent 7282f455aa
commit f30ac207ad

View File

@ -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];