提交 006decd4 编写于 作者: G Gerd Hoffmann

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: NMarkus Armbruster <armbru@redhat.com>
Tested-by: NMarkus Armbruster <armbru@redhat.com>
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 9634f4e3
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册