From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Marcel Apfelbaum <marcel@redhat.com>,
Chao Peng <chao.p.peng@linux.intel.com>
Subject: [Qemu-devel] [PULL 2/2] vnc: Wrap vnc initialization code with CONFIG_VNC
Date: Thu, 16 Jun 2016 14:06:18 -0300 [thread overview]
Message-ID: <1466096778-13248-3-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1466096778-13248-1-git-send-email-ehabkost@redhat.com>
From: Chao Peng <chao.p.peng@linux.intel.com>
commit f8c75b2486 (vnc: Initialization stubs) removed CONFIG_VNC in vl.c
code. However qemu_find_opts("vnc") is NULL when vnc is configured out.
Crash will happen in qemu_opts_foreach() before stub vnc_init_func() is
called. This patch add it back.
Cc: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Chao Peng <chao.p.peng@linux.intel.com>
---
vl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/vl.c b/vl.c
index 45eff56..2088491 100644
--- a/vl.c
+++ b/vl.c
@@ -4557,8 +4557,10 @@ int main(int argc, char **argv, char **envp)
os_setup_signal_handling();
/* init remote displays */
+#ifdef CONFIG_VNC
qemu_opts_foreach(qemu_find_opts("vnc"),
vnc_init_func, NULL, NULL);
+#endif
if (show_vnc_port) {
char *ret = vnc_display_local_addr("default");
printf("VNC server running on '%s'\n", ret);
--
2.5.5
next prev parent reply other threads:[~2016-06-16 17:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-16 17:06 [Qemu-devel] [PULL 0/2] Machine queue, 2016-06-16 Eduardo Habkost
2016-06-16 17:06 ` [Qemu-devel] [PULL 1/2] qdev: Use GList for global properties Eduardo Habkost
2016-06-16 17:06 ` Eduardo Habkost [this message]
2016-06-17 10:19 ` [Qemu-devel] [PULL 0/2] Machine queue, 2016-06-16 Peter Maydell
2016-06-17 13:47 ` Eduardo Habkost
2016-06-17 15:16 ` Peter Maydell
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=1466096778-13248-3-git-send-email-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=chao.p.peng@linux.intel.com \
--cc=marcel@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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).