Signed-off-by: Chunyan Liu <cyliu(a)suse.com>
---
src/qemu/qemu_hostdev.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c
index 74923a1..ea776ce 100644
--- a/src/qemu/qemu_hostdev.c
+++ b/src/qemu/qemu_hostdev.c
@@ -1304,6 +1304,7 @@ qemuReattachPciDevice(virPCIDevicePtr dev, virHostdevManagerPtr
mgr)
*/
static void
virHostdevReAttachPCIDevices(virHostdevManagerPtr hostdev_mgr,
+ const char *drv_name,
const char *name,
virDomainHostdevDefPtr *hostdevs,
int nhostdevs,
@@ -1342,7 +1343,7 @@ virHostdevReAttachPCIDevices(virHostdevManagerPtr hostdev_mgr,
const char *usedby_drvname;
const char *usedby_domname;
virPCIDeviceGetUsedBy(activeDev, &usedby_drvname, &usedby_domname);
- if (STRNEQ_NULLABLE(QEMU_DRIVER_NAME, usedby_drvname) ||
+ if (STRNEQ_NULLABLE(drv_name, usedby_drvname) ||
STRNEQ_NULLABLE(name, usedby_domname)) {
virPCIDeviceListDel(pcidevs, dev);
continue;
@@ -1402,7 +1403,7 @@ qemuDomainReAttachHostdevDevices(virQEMUDriverPtr driver,
if (hostdev_mgr == NULL)
goto out;
- virHostdevReAttachPCIDevices(hostdev_mgr, name,
+ virHostdevReAttachPCIDevices(hostdev_mgr, QEMU_DRIVER_NAME, name,
hostdevs, nhostdevs, oldStateDir);
out:
--
1.6.0.2