From: Peter Krempa Date: Tue, 15 Jun 2021 09:47:01 +0000 (+0200) Subject: qemu: capabilities: Fill SDL graphics support only when it's really supported X-Git-Tag: v7.5.0-rc1~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=599b17d5801cd717f1e6a990dbbe295ae2100433;p=thirdparty%2Flibvirt.git qemu: capabilities: Fill SDL graphics support only when it's really supported 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 --- 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))