[PATCH v13 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 |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c
index 5eb12d1..a7b4e74 100644
--- a/src/qemu/qemu_hostdev.c
+++ b/src/qemu/qemu_hostdev.c
@@ -265,6 +265,7 @@ qemuPrepareHostUSBDevices(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
 
 static int
 virHostdevPrepareSCSIDevices(virHostdevManagerPtr hostdev_mgr,
+                             const char *drv_name,
                              const char *name,
                              virDomainHostdevDefPtr *hostdevs,
                              int nhostdevs)
@@ -335,10 +336,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));
@@ -403,7 +404,8 @@ qemuPrepareHostdevSCSIDevices(virQEMUDriverPtr driver,
             return -1;
     }
 
-    return virHostdevPrepareSCSIDevices(hostdev_mgr, name, hostdevs, nhostdevs);
+    return virHostdevPrepareSCSIDevices(hostdev_mgr, QEMU_DRIVER_NAME,
+                                        name, hostdevs, nhostdevs);
 }
 
 
-- 
1.6.0.2

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