On 23/10/2023 13.30, marcandre.lur...@redhat.com wrote:
From: Marc-André Lureau <marcandre.lur...@redhat.com>

The next commit needs to have the display registered itself before
creating the default VCs.

Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com>
---
  system/vl.c | 41 +++++++++++++++++++++++------------------
  1 file changed, 23 insertions(+), 18 deletions(-)

diff --git a/system/vl.c b/system/vl.c
index 92d29bf521..2cecb3d884 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -1349,6 +1349,28 @@ static void qemu_disable_default_devices(void)
      }
  }
+static void qemu_early_display_init(void)
+{
+#if defined(CONFIG_VNC)
+    if (!QTAILQ_EMPTY(&(qemu_find_opts("vnc")->head))) {
+        display_remote++;
+    }
+#endif
+    if (dpy.type == DISPLAY_TYPE_DEFAULT && !display_remote) {
+        if (!qemu_display_find_default(&dpy)) {
+            dpy.type = DISPLAY_TYPE_NONE;
+#if defined(CONFIG_VNC)
+            vnc_parse("localhost:0,to=99,id=default");
+#endif
+        }
+    }
+    if (dpy.type == DISPLAY_TYPE_DEFAULT) {
+        dpy.type = DISPLAY_TYPE_NONE;
+    }
+
+    qemu_display_early_init(&dpy);
+}

So we now have qemu_early_display_init() and qemu_display_early_init() ... ? That's very confusing, could you maybe come up with a different name for the new function?

 Thomas



Reply via email to