1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-20 06:50:22 +03:00

domain_validate: XML validate that non-virtio video devices have none virtio options

With this, XML fails if non-virtio video devices have virtio
options. Previously it didn't raise error.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1922093
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Kristina Hanicova 2021-03-10 17:42:51 +01:00 committed by Michal Privoznik
parent b5d25b8183
commit 25d3b41e5e

View File

@ -187,6 +187,10 @@ virDomainVideoDefValidate(const virDomainVideoDef *video,
}
}
if (video->type != VIR_DOMAIN_VIDEO_TYPE_VIRTIO &&
(virDomainCheckVirtioOptionsAreAbsent(video->virtio) < 0))
return -1;
return 0;
}