diff options
| author | Gerd Hoffmann <kraxel@redhat.com> | 2015-02-17 08:45:06 +0100 |
|---|---|---|
| committer | Gerd Hoffmann <kraxel@redhat.com> | 2015-03-10 11:33:39 +0100 |
| commit | 006decd448ae3ce04f12e2bbdd3079ba74d25c89 (patch) | |
| tree | 4eb51451c833d673eb315ff7ce7705274b14ea5d | |
| parent | 9634f4e3b721f75f9ba4c87fe1499d5e95fc63ca (diff) | |
| download | focaccia-qemu-006decd448ae3ce04f12e2bbdd3079ba74d25c89.tar.gz focaccia-qemu-006decd448ae3ce04f12e2bbdd3079ba74d25c89.zip | |
vnc: -readconfig fix
Now that -vnc goes through QemuOpts we can get vnc configuration via -readconfig too. So setting display_remote in the command line parsing code doesn't cut it any more, we must check QemuOpts instead to see whenever any vnc display is configured. Reported-by: Markus Armbruster <armbru@redhat.com> Tested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| -rw-r--r-- | vl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vl.c b/vl.c index b47e223a49..eba5d4c99b 100644 --- a/vl.c +++ b/vl.c @@ -2001,7 +2001,6 @@ static DisplayType select_display(const char *p) } else if (strstart(p, "vnc", &opts)) { #ifdef CONFIG_VNC if (*opts == '=') { - display_remote++; if (vnc_parse_func(opts+1) == NULL) { exit(1); } @@ -3477,7 +3476,6 @@ int main(int argc, char **argv, char **envp) break; case QEMU_OPTION_vnc: #ifdef CONFIG_VNC - display_remote++; if (vnc_parse_func(optarg) == NULL) { exit(1); } @@ -3970,6 +3968,11 @@ int main(int argc, char **argv, char **envp) } } +#if defined(CONFIG_VNC) + if (!QTAILQ_EMPTY(&(qemu_find_opts("vnc")->head))) { + display_remote++; + } +#endif if (display_type == DT_DEFAULT && !display_remote) { #if defined(CONFIG_GTK) display_type = DT_GTK; |