Skip to content

Commit

Permalink
vl: simplify display_remote logic
Browse files Browse the repository at this point in the history
Bump the display_remote variable when the -vnc option is parsed, just
like -spice.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
  • Loading branch information
elmarco committed Nov 7, 2023
1 parent 6261164 commit 484629f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions system/vl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1401,11 +1401,6 @@ static void qemu_create_default_devices(void)
#endif
}

#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;
Expand Down Expand Up @@ -3350,6 +3345,7 @@ void qemu_init(int argc, char **argv)
#ifdef CONFIG_VNC
case QEMU_OPTION_vnc:
vnc_parse(optarg);
display_remote++;
break;
#endif
case QEMU_OPTION_no_acpi:
Expand Down

0 comments on commit 484629f

Please sign in to comment.