]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Filter non SCSI hostdevs in qemuHostdevPrepareSCSIDevices
authorJohn Ferlan <jferlan@redhat.com>
Thu, 10 Jan 2019 23:05:12 +0000 (18:05 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 11 Jan 2019 13:52:10 +0000 (08:52 -0500)
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>
src/qemu/qemu_hostdev.c

index a487e1d3aaa440c452c0322c3614a5f4d1805b8a..4eb3f1d7f1dc9840d00e4b9fed2a7f6619870e67 100644 (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];