]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: capabilities: Fill egl-headless graphics support only when it's really supported
authorPeter Krempa <pkrempa@redhat.com>
Tue, 15 Jun 2021 09:47:01 +0000 (11:47 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 18 Jun 2021 07:16:16 +0000 (09:16 +0200)
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 <pkrempa@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
src/qemu/qemu_capabilities.c

index a1f1a2b23e4d315a6b80eb44855997c67ac3dbbd..d1cd8f11ac8c39f29025939de95e1eea98baf6fb 100644 (file)
@@ -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);
 }