mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-09 09:14:57 +00:00
hotplug: Check for alias in controller detach
In qemuDomainDetachControllerDevice if the info.alias already exists a call to qemuAssignDeviceControllerAlias would overwrite the existing so avoid this possibility.
This commit is contained in:
parent
c4056d2b45
commit
65be7572d2
@ -3226,7 +3226,8 @@ int qemuDomainDetachControllerDevice(virQEMUDriverPtr driver,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE)) {
|
||||
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE) &&
|
||||
!detach->info.alias) {
|
||||
if (qemuAssignDeviceControllerAlias(detach) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user