render / rpms / libvirt

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