mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-04-01 20:05:19 +00:00
hotplug: Check for alias in chrdev detach
If the QEMU_CAPS_DEVICE is set, then ensure the chr device alias has been properly set before making the calls to detach the device
This commit is contained in:
parent
9de26f27cf
commit
4d8a4165a7
@ -3696,6 +3696,12 @@ int qemuDomainDetachChrDevice(virQEMUDriverPtr driver,
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE) &&
|
||||
!tmpChr->info.alias) {
|
||||
if (qemuAssignDeviceChrAlias(vmdef, tmpChr, -1) < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (qemuBuildChrDeviceStr(&devstr, vm->def, chr, priv->qemuCaps) < 0)
|
||||
return ret;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user