[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 2/3] sockets: switch vnc to new code, support vn

From: Ryan Harper
Subject: Re: [Qemu-devel] [PATCH 2/3] sockets: switch vnc to new code, support vnc port auto-allocation.
Date: Wed, 26 Nov 2008 17:25:17 -0600
User-agent: Mutt/1.5.6+20040907i

* Gerd Hoffmann <address@hidden> [2008-11-03 10:57]:
> This patch switches the vnc code ofer to the new socket helper
> functions.
> It adds support IPv6 support and for automatically allocating an unused
> vnc display port.  The latter is handled ising a to= option, specifying
> the upper limit for the display number to try.  Scanning is started at
> the display number given in the display specification, i.e. this command
> line:
>     -vnc localhost:7,to=11
> will try displays 7 to 11 (inclusive).
> There are also new "ipv4" and "ipv6" options to make qemu try only
> the specified internet protocol version.
> The display actually allocated can be queried using the "info vnc"
> monitor command.

When using an existing unix file like:

-vnc unix:/tmp/file1Y2nY2

qemu fails to bind a unix socket because the vnc call to unix_listen
includes the unix: prefix, and stores that in the unix.sun_path.  Like
the qemu-char handler, don't pass in unix: for the filename.  This fixes
-vnc unix:<file> for me.

Haven't tested all cases of -vnc, so, double check that this is the
right fix.

Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx

diffstat output:
 vnc.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Signed-off-by: Ryan Harper <address@hidden>
diff --git a/vnc.c b/vnc.c
index f663b38..c0e591c 100644
--- a/vnc.c
+++ b/vnc.c
@@ -2413,7 +2413,7 @@ int vnc_display_open(DisplayState *ds, const char 
         dpy = qemu_malloc(256);
         if (strncmp(display, "unix:", 5) == 0) {
             strcpy(dpy, "unix:");
-            vs->lsock = unix_listen(display, dpy+5, 256-5);
+            vs->lsock = unix_listen(display+5, dpy+5, 256-5);
         } else {
             vs->lsock = inet_listen(display, dpy, 256, SOCK_STREAM, 5900);

reply via email to

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