Blame SOURCES/kvm-egl-headless-parse-rendernode.patch

7711c0
From a2832a5633f66f85843184c223517bdb124104c2 Mon Sep 17 00:00:00 2001
7711c0
From: Gerd Hoffmann <kraxel@redhat.com>
7711c0
Date: Tue, 5 Mar 2019 08:26:17 +0100
7711c0
Subject: [PATCH 9/9] egl-headless: parse rendernode
7711c0
MIME-Version: 1.0
7711c0
Content-Type: text/plain; charset=UTF-8
7711c0
Content-Transfer-Encoding: 8bit
7711c0
7711c0
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
7711c0
Message-id: <20190305082617.14614-5-kraxel@redhat.com>
7711c0
Patchwork-id: 84797
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 4/4] egl-headless: parse rendernode
7711c0
Bugzilla: 1648236
7711c0
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
7711c0
RH-Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
7711c0
RH-Acked-by: John Snow <jsnow@redhat.com>
7711c0
RH-Acked-by: Erik Skultety <eskultet@redhat.com>
7711c0
7711c0
RHEL-7 hasn't the qapi-based -display parser, so we need a
7711c0
few lines of code to explicitly handle the new option.
7711c0
7711c0
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 vl.c | 9 +++++++++
7711c0
 1 file changed, 9 insertions(+)
7711c0
7711c0
diff --git a/vl.c b/vl.c
7711c0
index 8b79eb9..dfe261d 100644
7711c0
--- a/vl.c
7711c0
+++ b/vl.c
7711c0
@@ -2202,6 +2202,15 @@ static void parse_display(const char *p)
7711c0
         }
7711c0
     } else if (strstart(p, "egl-headless", &opts)) {
7711c0
         dpy.type = DISPLAY_TYPE_EGL_HEADLESS;
7711c0
+        if (*opts) {
7711c0
+            const char *nextopt;
7711c0
+            if (strstart(opts, ",rendernode=", &nextopt)) {
7711c0
+                dpy.u.egl_headless.rendernode = strdup(nextopt);
7711c0
+            } else {
7711c0
+                error_report("invalid egl-headless option string");
7711c0
+                exit(1);
7711c0
+            }
7711c0
+        }
7711c0
     } else if (strstart(p, "curses", &opts)) {
7711c0
         dpy.type = DISPLAY_TYPE_CURSES;
7711c0
     } else if (strstart(p, "gtk", &opts)) {
7711c0
-- 
7711c0
1.8.3.1
7711c0