1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-25 01:34:11 +03:00

XML validate that 'ramfb' has no address

With this, XML fails if config video type 'ramfb' contains
address, since address is not supported for 'ramfb' video
devices. Previously it didn't raise error.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1891416
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Kristina Hanicova 2021-03-05 13:01:21 +01:00 committed by Ján Tomko
parent 7dfa87aed3
commit f11f32326f

View File

@ -151,6 +151,14 @@ virDomainVideoDefValidate(const virDomainVideoDef *video,
}
}
if (video->type == VIR_DOMAIN_VIDEO_TYPE_RAMFB) {
if (video->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("address not supported for video type ramfb"));
return -1;
}
}
return 0;
}