mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
vnc: remove unused DisplayState parameter, add id instead.
DisplayState isn't used anywhere, drop it. Add the vnc server ID as parameter instead, so it is possible to specify the server instance. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com>
This commit is contained in:
parent
d616ccc5dd
commit
14f7143ede
3 changed files with 26 additions and 26 deletions
7
vl.c
7
vl.c
|
@ -4288,8 +4288,9 @@ int main(int argc, char **argv, char **envp)
|
|||
/* init remote displays */
|
||||
if (vnc_display) {
|
||||
Error *local_err = NULL;
|
||||
vnc_display_init(ds);
|
||||
vnc_display_open(ds, vnc_display, &local_err);
|
||||
const char *id = "default";
|
||||
vnc_display_init(id);
|
||||
vnc_display_open(id, vnc_display, &local_err);
|
||||
if (local_err != NULL) {
|
||||
error_report("Failed to start VNC server on `%s': %s",
|
||||
vnc_display, error_get_pretty(local_err));
|
||||
|
@ -4298,7 +4299,7 @@ int main(int argc, char **argv, char **envp)
|
|||
}
|
||||
|
||||
if (show_vnc_port) {
|
||||
printf("VNC server running on `%s'\n", vnc_display_local_addr(ds));
|
||||
printf("VNC server running on `%s'\n", vnc_display_local_addr(id));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue