Signed-off-by: Chunyan Liu <cyliu(a)suse.com>
---
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