提交 50c1dbaf 编写于 作者: M Michal Privoznik

qemu: cold-plug of watchdog

https://bugzilla.redhat.com/show_bug.cgi?id=1447169

With this patch users can cold plug a watchdog. Things are pretty
simple because a domain can have at most one watchdog device.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 891b3c11
......@@ -7995,10 +7995,18 @@ qemuDomainAttachDeviceConfig(virDomainDefPtr vmdef,
dev->data.shmem = NULL;
break;
case VIR_DOMAIN_DEVICE_WATCHDOG:
if (vmdef->watchdog) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("domain already has a watchdog"));
return -1;
}
VIR_STEAL_PTR(vmdef->watchdog, dev->data.watchdog);
break;
case VIR_DOMAIN_DEVICE_INPUT:
case VIR_DOMAIN_DEVICE_SOUND:
case VIR_DOMAIN_DEVICE_VIDEO:
case VIR_DOMAIN_DEVICE_WATCHDOG:
case VIR_DOMAIN_DEVICE_GRAPHICS:
case VIR_DOMAIN_DEVICE_HUB:
case VIR_DOMAIN_DEVICE_SMARTCARD:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册