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