[PATCH v13 26/49] pass driver name to virHostdevPrepareUSBDevices

[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 15ed47c..a7e6c91 100644
--- a/src/qemu/qemu_hostdev.c
+++ b/src/qemu/qemu_hostdev.c
@@ -248,6 +248,7 @@ out:
 
 static int
 virHostdevMarkUsbHostdevs(virHostdevManagerPtr mgr,
+                          const char *drv_name,
                           const char *name,
                           virUSBDeviceListPtr list)
 {
@@ -278,7 +279,7 @@ virHostdevMarkUsbHostdevs(virHostdevManagerPtr mgr,
             goto error;
         }
 
-        virUSBDeviceSetUsedBy(usb, QEMU_DRIVER_NAME, name);
+        virUSBDeviceSetUsedBy(usb, drv_name, name);
         VIR_DEBUG("Adding %03d.%03d dom=%s to activeUsbHostdevs",
                   virUSBDeviceGetBus(usb), virUSBDeviceGetDevno(usb), name);
         /*
@@ -392,6 +393,7 @@ out:
 
 static int
 virHostdevPrepareUSBDevices(virHostdevManagerPtr hostdev_mgr,
+                            const char *drv_name,
                             const char *dom_name,
                             virDomainHostdevDefPtr *hostdevs,
                             int nhostdevs,
@@ -441,7 +443,7 @@ virHostdevPrepareUSBDevices(virHostdevManagerPtr hostdev_mgr,
      * and add them do driver list. However, if something goes
      * wrong, perform rollback.
      */
-    if (virHostdevMarkUsbHostdevs(hostdev_mgr, dom_name, list) < 0)
+    if (virHostdevMarkUsbHostdevs(hostdev_mgr, drv_name, dom_name, list) < 0)
         goto cleanup;
 
     /* Loop 2: Temporary list was successfully merged with
@@ -474,7 +476,7 @@ qemuPrepareHostUSBDevices(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
     if (hostdev_mgr == NULL)
         return -1;
 
-    return virHostdevPrepareUSBDevices(hostdev_mgr, dom_name,
+    return virHostdevPrepareUSBDevices(hostdev_mgr, QEMU_DRIVER_NAME, dom_name,
                                        hostdevs, nhostdevs, flags);
 }
 
-- 
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]