[PATCH v14 29/49] pass driver name as parameter to virHostdevPrepareSCSIDevices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Chunyan Liu <cyliu@xxxxxxxx>
---
 src/qemu/qemu_hostdev.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c
index 9ad32e0..41ee32f 100644
--- a/src/qemu/qemu_hostdev.c
+++ b/src/qemu/qemu_hostdev.c
@@ -247,6 +247,7 @@ qemuPrepareHostUSBDevices(virQEMUDriverPtr driver,
 
 static int
 virHostdevPrepareSCSIDevices(virHostdevManagerPtr hostdev_mgr,
+                             const char *drv_name,
                              const char *name,
                              virDomainHostdevDefPtr *hostdevs,
                              int nhostdevs)
@@ -317,10 +318,10 @@ virHostdevPrepareSCSIDevices(virHostdevManagerPtr hostdev_mgr,
                 goto error;
             }
 
-            if (virSCSIDeviceSetUsedBy(tmp, QEMU_DRIVER_NAME, name) < 0)
+            if (virSCSIDeviceSetUsedBy(tmp, drv_name, name) < 0)
                 goto error;
         } else {
-            if (virSCSIDeviceSetUsedBy(scsi, QEMU_DRIVER_NAME, name) < 0)
+            if (virSCSIDeviceSetUsedBy(scsi, drv_name, name) < 0)
                 goto error;
 
             VIR_DEBUG("Adding %s to activeScsiHostdevs", virSCSIDeviceGetName(scsi));
@@ -380,8 +381,8 @@ qemuPrepareHostdevSCSIDevices(virQEMUDriverPtr driver,
             return -1;
     }
 
-    return virHostdevPrepareSCSIDevices(hostdev_mgr, name,
-                                        hostdevs, nhostdevs);
+    return virHostdevPrepareSCSIDevices(hostdev_mgr, QEMU_DRIVER_NAME,
+                                        name, hostdevs, nhostdevs);
 }
 
 
-- 
1.9.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]