From 599b17d5801cd717f1e6a990dbbe295ae2100433 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 15 Jun 2021 11:47:01 +0200 Subject: [PATCH] qemu: capabilities: Fill SDL graphics support only when it's really supported MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit virQEMUCapsFillDomainDeviceGraphicsCaps fills data needed both for validation of the graphics type and also for correct display in the (dom)capablities XML. Signal the support for SDL only when qemu has the capability. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko Reviewed-by: Thomas Huth --- src/qemu/qemu_capabilities.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 4845f3ad73..e32b898bb7 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -6075,7 +6075,8 @@ virQEMUCapsFillDomainDeviceGraphicsCaps(virQEMUCaps *qemuCaps, dev->supported = VIR_TRISTATE_BOOL_YES; dev->type.report = true; - VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_SDL); + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SDL)) + VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_SDL); if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VNC)) VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_VNC); if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SPICE))