From f11f32326f163dda28143e9495d9bbc5d4869f6d Mon Sep 17 00:00:00 2001 From: Kristina Hanicova Date: Fri, 5 Mar 2021 13:01:21 +0100 Subject: [PATCH] XML validate that 'ramfb' has no address MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Ján Tomko Signed-off-by: Ján Tomko --- src/conf/domain_validate.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index 00e0216547..ceefe18ac4 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -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; } -- 2.47.2