Blame SOURCES/libvirt-qemu-command-Introduce-qemuBuildGraphicsEGLHeadlessCommandLine-helper.patch

0a7476
From 4f6f2054b528814285ad5bf8433721c9b8fcaff5 Mon Sep 17 00:00:00 2001
0a7476
Message-Id: <4f6f2054b528814285ad5bf8433721c9b8fcaff5@dist-git>
0a7476
From: Erik Skultety <eskultet@redhat.com>
0a7476
Date: Tue, 9 Apr 2019 08:34:28 +0200
0a7476
Subject: [PATCH] qemu: command: Introduce
0a7476
 qemuBuildGraphicsEGLHeadlessCommandLine helper
0a7476
MIME-Version: 1.0
0a7476
Content-Type: text/plain; charset=UTF-8
0a7476
Content-Transfer-Encoding: 8bit
0a7476
0a7476
We're going to need a bit more logic for egl-headless down the road so
0a7476
prepare a helper just like for the other display types.
0a7476
0a7476
Signed-off-by: Erik Skultety <eskultet@redhat.com>
0a7476
Reviewed-by: Ján Tomko <jtomko@redhat.com>
0a7476
(cherry picked from commit eeb7059aa3f42bcd6d42a41078e588b6b4b25c1e)
0a7476
0a7476
https: //bugzilla.redhat.com/show_bug.cgi?id=1628892
0a7476
Signed-off-by: Erik Skultety <eskultet@redhat.com>
0a7476
Message-Id: <4e0aaf4349699b0588b9eb17ad4e34f309658a72.1554791287.git.eskultet@redhat.com>
0a7476
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
0a7476
---
0a7476
 src/qemu/qemu_command.c | 18 ++++++++++++++++--
0a7476
 1 file changed, 16 insertions(+), 2 deletions(-)
0a7476
0a7476
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
0a7476
index 52650dc46d..d60fbd4c8c 100644
0a7476
--- a/src/qemu/qemu_command.c
0a7476
+++ b/src/qemu/qemu_command.c
0a7476
@@ -8195,6 +8195,19 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfigPtr cfg,
0a7476
 }
0a7476
 
0a7476
 
0a7476
+static int
0a7476
+qemuBuildGraphicsEGLHeadlessCommandLine(virQEMUDriverConfigPtr cfg ATTRIBUTE_UNUSED,
0a7476
+                                        virCommandPtr cmd,
0a7476
+                                        virQEMUCapsPtr qemuCaps ATTRIBUTE_UNUSED,
0a7476
+                                        virDomainGraphicsDefPtr graphics ATTRIBUTE_UNUSED)
0a7476
+{
0a7476
+    virCommandAddArg(cmd, "-display");
0a7476
+    virCommandAddArg(cmd, "egl-headless");
0a7476
+
0a7476
+    return 0;
0a7476
+}
0a7476
+
0a7476
+
0a7476
 static int
0a7476
 qemuBuildGraphicsCommandLine(virQEMUDriverConfigPtr cfg,
0a7476
                              virCommandPtr cmd,
0a7476
@@ -8226,8 +8239,9 @@ qemuBuildGraphicsCommandLine(virQEMUDriverConfigPtr cfg,
0a7476
 
0a7476
             break;
0a7476
         case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS:
0a7476
-            virCommandAddArg(cmd, "-display");
0a7476
-            virCommandAddArg(cmd, "egl-headless");
0a7476
+            if (qemuBuildGraphicsEGLHeadlessCommandLine(cfg, cmd,
0a7476
+                                                        qemuCaps, graphics) < 0)
0a7476
+                return -1;
0a7476
 
0a7476
             break;
0a7476
         case VIR_DOMAIN_GRAPHICS_TYPE_RDP:
0a7476
-- 
0a7476
2.21.0
0a7476