[PATCH v13 32/49] pass driver name as paramter to virHostdevReAttachUsbHostdevs

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

 



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

diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c
index 64372a3..2c92c2b 100644
--- a/src/qemu/qemu_hostdev.c
+++ b/src/qemu/qemu_hostdev.c
@@ -344,6 +344,7 @@ out:
 
 static void
 virHostdevReAttachUsbHostdevs(virHostdevManagerPtr hostdev_mgr,
+                              const char *drv_name,
                               const char *name,
                               virDomainHostdevDefPtr *hostdevs,
                               int nhostdevs)
@@ -393,7 +394,7 @@ virHostdevReAttachUsbHostdevs(virHostdevManagerPtr hostdev_mgr,
         }
 
         virUSBDeviceGetUsedBy(tmp, &usedby_drvname, &usedby_domname);
-        if (STREQ_NULLABLE(QEMU_DRIVER_NAME, usedby_drvname) &&
+        if (STREQ_NULLABLE(drv_name, usedby_drvname) &&
             STREQ_NULLABLE(name, usedby_domname)) {
             VIR_DEBUG("Removing %03d.%03d dom=%s from activeUsbHostdevs",
                       hostdev->source.subsys.u.usb.bus,
@@ -418,7 +419,8 @@ qemuDomainReAttachHostUsbDevices(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
     if (hostdev_mgr == NULL)
         return;
 
-    virHostdevReAttachUsbHostdevs(hostdev_mgr, name, hostdevs, nhostdevs);
+    virHostdevReAttachUsbHostdevs(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]