]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
ui: remove redundant use of error_printf_unless_qmp()
authorDaniel P. Berrangé <berrange@redhat.com>
Wed, 14 Jan 2026 11:56:36 +0000 (11:56 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 5 Mar 2026 17:40:24 +0000 (17:40 +0000)
The vnc_display_print_local_addr() method is intended to print the VNC
listening address on the console at startup, so the user can see the
auto-chosen port address when using the 'to=' flag. This is only called
by vnc_display_open() which is in the QEMU startup callpath. The check
for not being in QMP is thus redundant and can be removed.

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
ui/vnc.c

index 8bf14cf9a728691fd182ea1b0f0b49c713a04e5f..952976e964914d77959d28438b9f14124777d5e6 100644 (file)
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3578,9 +3578,9 @@ static void vnc_display_print_local_addr(VncDisplay *vd)
         qapi_free_SocketAddress(addr);
         return;
     }
-    error_printf_unless_qmp("VNC server running on %s:%s\n",
-                            addr->u.inet.host,
-                            addr->u.inet.port);
+    error_printf("VNC server running on %s:%s\n",
+                 addr->u.inet.host,
+                 addr->u.inet.port);
     qapi_free_SocketAddress(addr);
 }