qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ryan Harper <ryanh@us.ibm.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
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	[thread overview]
Message-ID: <20081126232517.GQ31893@us.ibm.com> (raw)
In-Reply-To: <1225730550-31941-3-git-send-email-kraxel@redhat.com>

* Gerd Hoffmann <kraxel@redhat.com> [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
ryanh@us.ibm.com


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

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
---
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 *display)
         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);
         }

  parent reply	other threads:[~2008-11-26 23:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-03 16:42 [Qemu-devel] [PATCH v3 0/3] ipv6 and autoport patches Gerd Hoffmann
2008-11-03 16:42 ` [Qemu-devel] [PATCH 1/3] sockets: helper functions for qemu Gerd Hoffmann
2008-11-04 12:42   ` [Qemu-devel] " Gerd Hoffmann
2008-11-11 20:41   ` [Qemu-devel] " Anthony Liguori
2008-11-11 21:14     ` Gerd Hoffmann
2008-11-11 20:47   ` Anthony Liguori
2008-11-03 16:42 ` [Qemu-devel] [PATCH 2/3] sockets: switch vnc to new code, support vnc port auto-allocation Gerd Hoffmann
2008-11-11 20:52   ` Anthony Liguori
2008-11-26 23:25   ` Ryan Harper [this message]
2008-11-27  9:11     ` Gerd Hoffmann
2008-11-03 16:42 ` [Qemu-devel] [PATCH 3/3] sockets: switch over tcp/telnet/unix serial line to new helper functions Gerd Hoffmann
2008-11-11 20:54   ` Anthony Liguori

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=20081126232517.GQ31893@us.ibm.com \
    --to=ryanh@us.ibm.com \
    --cc=kraxel@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).