Skip to content

Commit

Permalink
vl: add missing display_remote++
Browse files Browse the repository at this point in the history
We should also consider -display vnc= as setting up a remote display,
and not attempt to add another default one.

The display_remote++ in qemu_setup_display() isn't necessary at this
point, but is there for completeness and further usages of the variable.

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1988
Fixes: commit 484629f ("vl: simplify display_remote logic ")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
  • Loading branch information
elmarco committed Nov 21, 2023
1 parent 0e88230 commit ff2a5be
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions system/vl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,7 @@ static void parse_display(const char *p)
*/
if (*opts == '=') {
vnc_parse(opts + 1);
display_remote++;
} else {
error_report("VNC requires a display argument vnc=<display>");
exit(1);
Expand Down Expand Up @@ -1359,6 +1360,7 @@ static void qemu_setup_display(void)
dpy.type = DISPLAY_TYPE_NONE;
#if defined(CONFIG_VNC)
vnc_parse("localhost:0,to=99,id=default");
display_remote++;
#endif
}
}
Expand Down

0 comments on commit ff2a5be

Please sign in to comment.