qemu: hotplug: Assume QEMU_CAPS_DEVICE in qemuDomainDetachHostPCIDevice

This commit is contained in:
Peter Krempa 2016-04-26 15:06:07 +02:00
parent 920e811f9f
commit 78bb0df8c9

View File

@ -3666,11 +3666,7 @@ qemuDomainDetachHostPCIDevice(virQEMUDriverPtr driver,
qemuDomainMarkDeviceForRemoval(vm, detach->info);
qemuDomainObjEnterMonitor(driver, vm);
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE)) {
ret = qemuMonitorDelDevice(priv->mon, detach->info->alias);
} else {
ret = qemuMonitorRemovePCIDevice(priv->mon, &detach->info->addr.pci);
}
ret = qemuMonitorDelDevice(priv->mon, detach->info->alias);
if (qemuDomainObjExitMonitor(driver, vm) < 0)
ret = -1;