From: Peter Krempa Date: Tue, 15 Jun 2021 09:47:01 +0000 (+0200) Subject: qemu: capabilities: Fill egl-headless graphics support only when it's really supported X-Git-Tag: v7.5.0-rc1~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3e578b2ef007e11168b613bed35ed09d93e2472;p=thirdparty%2Flibvirt.git qemu: capabilities: Fill egl-headless 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 egl-headless only when qemu has the capability. Signed-off-by: Peter Krempa Reviewed-by: Thomas Huth --- diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index a1f1a2b23e..d1cd8f11ac 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -6066,7 +6066,8 @@ virQEMUCapsFillDomainDeviceGraphicsCaps(virQEMUCaps *qemuCaps, VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_VNC); if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SPICE)) VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_SPICE); - VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS); + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_EGL_HEADLESS)) + VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS); }