mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
qemu_driver: add validation of potential dependencies on cold plug
Although virDomainDeviceDefValidate() is called as a part of parsing device XML routine, it validates only that single device. The virDomainDefValidate() function performs a more comprehensive check. It should detect errors resulting from dependencies between devices, or a device and some other part of XML config. Therefore, a call to virDomainDefValidate() is added at the end of qemuDomainAttachDeviceConfig(). Signed-off-by: Adam Julis <ajulis@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
3fff8c91b0
commit
59f6e226bb
@ -6869,6 +6869,9 @@ qemuDomainAttachDeviceConfig(virDomainDef *vmdef,
|
||||
if (virDomainDefPostParse(vmdef, parse_flags, xmlopt, qemuCaps) < 0)
|
||||
return -1;
|
||||
|
||||
if (virDomainDefValidate(vmdef, parse_flags, xmlopt, qemuCaps) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user