From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
armbru@redhat.com, Anthony Liguori <aliguori@amazon.com>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 2/2] vnc: -readconfig fix
Date: Tue, 17 Feb 2015 10:02:27 +0100 [thread overview]
Message-ID: <1424163747-27927-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1424163747-27927-1-git-send-email-kraxel@redhat.com>
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>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
vl.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/vl.c b/vl.c
index 8c8f142..6677f6c 100644
--- a/vl.c
+++ b/vl.c
@@ -2000,7 +2000,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);
}
@@ -3474,7 +3473,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);
}
@@ -3967,6 +3965,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;
--
1.8.3.1
next prev parent reply other threads:[~2015-02-17 9:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-17 9:02 [Qemu-devel] [PATCH 0/2] vnc: -readconfig fixups Gerd Hoffmann
2015-02-17 9:02 ` [Qemu-devel] [PATCH 1/2] vnc: set id at parse time not init time Gerd Hoffmann
2015-02-17 9:02 ` Gerd Hoffmann [this message]
2015-02-17 12:19 ` [Qemu-devel] [PATCH 0/2] vnc: -readconfig fixups Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1424163747-27927-3-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=aliguori@amazon.com \
--cc=armbru@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).