[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 2/2] vnc: Wrap vnc initialization code with CONFIG_VN

From: Eduardo Habkost
Subject: [Qemu-devel] [PULL 2/2] vnc: Wrap vnc initialization code with CONFIG_VNC
Date: Thu, 16 Jun 2016 14:06:18 -0300

From: Chao Peng <address@hidden>

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 <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Signed-off-by: Chao Peng <address@hidden>
 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)
     /* init remote displays */
+#ifdef CONFIG_VNC
                       vnc_init_func, NULL, NULL);
     if (show_vnc_port) {
         char *ret = vnc_display_local_addr("default");
         printf("VNC server running on '%s'\n", ret);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]