提交 4d8a4165 编写于 作者: J John Ferlan

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
上级 9de26f27
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册