ui/console: register the console from qemu_console_init()
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 30 Aug 2023 09:37:55 +0000 (13:37 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 4 Sep 2023 09:48:10 +0000 (13:48 +0400)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230830093843.3531473-22-marcandre.lureau@redhat.com>

ui/console.c

index dd8e8db5256bccdf1eb8780241947953ae451f87..02a24eaf5dca0925ebcca8df4c61b2debf888bff 100644 (file)
@@ -1366,6 +1366,7 @@ qemu_console_init(Object *obj)
     qemu_co_queue_init(&c->dump_queue);
     c->ds = ds;
     c->window_id = -1;
+    qemu_console_register(c);
 }
 
 static void
@@ -1419,8 +1420,6 @@ static QemuConsole *new_console(const char *typename,
     QemuConsole *c = QEMU_CONSOLE(object_new(typename));
 
     c->head = head;
-    /* TODO: move to console_init() once there is a type hierarchy */
-    qemu_console_register(c);
 
     return c;
 }