[PATCH v13 13/49] pass driver name as a parameter to virHostdevPrepareHostdevPCIDevices

[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 0b1be8f..bbc85bc 100644
--- a/src/qemu/qemu_hostdev.c
+++ b/src/qemu/qemu_hostdev.c
@@ -664,6 +664,7 @@ qemuPrepareHostdevPCICheckSupport(virDomainHostdevDefPtr *hostdevs,
 
 static int
 virHostdevPreparePCIDevices(virHostdevManagerPtr hostdev_mgr,
+                            const char *drv_name,
                             const char *name,
                             const unsigned char *uuid,
                             virDomainHostdevDefPtr *hostdevs,
@@ -785,7 +786,7 @@ virHostdevPreparePCIDevices(virHostdevManagerPtr hostdev_mgr,
         activeDev = virPCIDeviceListFind(hostdev_mgr->activePciHostdevs, dev);
 
         if (activeDev)
-            virPCIDeviceSetUsedBy(activeDev, QEMU_DRIVER_NAME, name);
+            virPCIDeviceSetUsedBy(activeDev, drv_name, name);
     }
 
     /* Loop 8: Now set the original states for hostdev def */
@@ -879,7 +880,8 @@ qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
     if (hostdev_mgr == NULL)
         goto out;
 
-    ret = virHostdevPreparePCIDevices(hostdev_mgr, name, uuid, hostdevs,
+    ret = virHostdevPreparePCIDevices(hostdev_mgr, QEMU_DRIVER_NAME,
+                                      name, uuid, hostdevs,
                                       nhostdevs, flags);
 
 out:
-- 
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]