mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 09:53:10 +00:00
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: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
891b3c119e
commit
50c1dbafae
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user