提交 34412740 编写于 作者: M Michal Privoznik

qemuDomainAttachDeviceConfig: Allow redirdev coldplug

This is really simple, we just need to append the device into the
domain def and that's it.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 87bbb6eb
......@@ -7796,6 +7796,7 @@ qemuDomainAttachDeviceConfig(virDomainDefPtr vmdef,
virDomainLeaseDefPtr lease;
virDomainControllerDefPtr controller;
virDomainFSDefPtr fs;
virDomainRedirdevDefPtr redirdev;
switch ((virDomainDeviceType) dev->type) {
case VIR_DOMAIN_DEVICE_DISK:
......@@ -7913,6 +7914,14 @@ qemuDomainAttachDeviceConfig(virDomainDefPtr vmdef,
dev->data.memory = NULL;
break;
case VIR_DOMAIN_DEVICE_REDIRDEV:
redirdev = dev->data.redirdev;
if (VIR_APPEND_ELEMENT(vmdef->redirdevs, vmdef->nredirdevs, redirdev) < 0)
return -1;
dev->data.redirdev = NULL;
break;
case VIR_DOMAIN_DEVICE_INPUT:
case VIR_DOMAIN_DEVICE_SOUND:
case VIR_DOMAIN_DEVICE_VIDEO:
......@@ -7923,7 +7932,6 @@ qemuDomainAttachDeviceConfig(virDomainDefPtr vmdef,
case VIR_DOMAIN_DEVICE_MEMBALLOON:
case VIR_DOMAIN_DEVICE_NVRAM:
case VIR_DOMAIN_DEVICE_SHMEM:
case VIR_DOMAIN_DEVICE_REDIRDEV:
case VIR_DOMAIN_DEVICE_NONE:
case VIR_DOMAIN_DEVICE_TPM:
case VIR_DOMAIN_DEVICE_PANIC:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册