mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 21:15:20 +00:00
qemu: hotplug: Assume QEMU_CAPS_DEVICE in qemuDomainAttachControllerDevice
This commit is contained in:
parent
b956512f6c
commit
7212992034
@ -450,7 +450,6 @@ int qemuDomainAttachControllerDevice(virQEMUDriverPtr driver,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE)) {
|
||||
if (controller->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
|
||||
if (qemuDomainMachineIsS390CCW(vm->def) &&
|
||||
virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_VIRTIO_CCW))
|
||||
@ -478,19 +477,12 @@ int qemuDomainAttachControllerDevice(virQEMUDriverPtr driver,
|
||||
|
||||
if (!(devstr = qemuBuildControllerDevStr(vm->def, controller, priv->qemuCaps, NULL)))
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (VIR_REALLOC_N(vm->def->controllers, vm->def->ncontrollers+1) < 0)
|
||||
goto cleanup;
|
||||
|
||||
qemuDomainObjEnterMonitor(driver, vm);
|
||||
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE)) {
|
||||
ret = qemuMonitorAddDevice(priv->mon, devstr);
|
||||
} else {
|
||||
ret = qemuMonitorAttachPCIDiskController(priv->mon,
|
||||
type,
|
||||
&controller->info.addr.pci);
|
||||
}
|
||||
if (qemuDomainObjExitMonitor(driver, vm) < 0) {
|
||||
releaseaddr = false;
|
||||
ret = -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user