All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: xen-devel@lists.xensource.com
Subject: [Patch] vnclisten for paravirt FB
Date: Fri, 29 Sep 2006 21:57:05 +0100	[thread overview]
Message-ID: <20060929205705.GD8564@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 760 bytes --]

This patch adds support for the 'vnclisten' parameter to the paravirt 
framebuffer. It has a dependancy on the paravirt framebuffer patches,
and the 3rd iteration of the HVM vnclisten patches. The patch was 
originally written by Jeremy Katz, adapted by myself to make it pull
default setting from /etc/xend-config.sxp if no per-guest setting for
vnclisten is present.

  Signed-off-by: Daniel P. Berrange <berrange@redhat.com>

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

[-- Attachment #2: xen-vnclisten-pvfb.patch --]
[-- Type: text/plain, Size: 2830 bytes --]

diff -ru xen-3.0.3-testing-11633.vnclisten/tools/python/xen/xend/image.py xen-3.0.3-testing-11633.vnclisten-pvfb/tools/python/xen/xend/image.py
--- xen-3.0.3-testing-11633.vnclisten/tools/python/xen/xend/image.py	2006-09-29 13:16:13.000000000 -0400
+++ xen-3.0.3-testing-11633.vnclisten-pvfb/tools/python/xen/xend/image.py	2006-09-29 16:42:11.000000000 -0400
@@ -225,6 +225,9 @@
             self.vncdisplay = sxp.child_value(imageConfig, 'vncdisplay',
                                               int(self.vm.getDomid()))
             self.vncunused = sxp.child_value(imageConfig, 'vncunused')
+            self.vnclisten = sxp.child_value(imageConfig, 'vnclisten')
+            if not(self.vnclisten):
+                self.vnclisten = xen.xend.XendRoot.instance().get_vnclisten_address()
         if self.vnc or self.sdl:
             log.info("setting use_graphics")
             self.vm.writeDom("console/use_graphics", "1")
@@ -244,6 +247,8 @@
                 args += ['--unused']
             elif self.vncdisplay:
                 args += [ "--vncport", "%d" %(5900 + self.vncdisplay,) ]
+            if self.vnclisten:
+                args += [ "--listen", self.vnclisten ]
         elif self.sdl:
             args = [xen.util.auxbin.pathTo("xen-sdlfb")]
         args = args + [ "--domid", "%d" % self.vm.getDomid(),
diff -ru xen-3.0.3-testing-11633.vnclisten/tools/xenfb/vncfb.c xen-3.0.3-testing-11633.vnclisten-pvfb/tools/xenfb/vncfb.c
--- xen-3.0.3-testing-11633.vnclisten/tools/xenfb/vncfb.c	2006-09-29 10:57:18.000000000 -0400
+++ xen-3.0.3-testing-11633.vnclisten-pvfb/tools/xenfb/vncfb.c	2006-09-29 16:41:29.000000000 -0400
@@ -89,16 +89,19 @@
     { "vncport", 1, NULL, 'p' },
     { "title", 1, NULL, 't' },
     { "unused", 0, NULL, 'u' },
+    { "listen", 1, NULL, 'l' },
 };
 
 int main(int argc, char **argv)
 {
 	rfbScreenInfoPtr server;
-	char *fake_argv[5] = { "vncfb", "-rfbport", "5901", 
-                               "-desktop", "xen-vncfb" };
+	char *fake_argv[7] = { "vncfb", "-rfbport", "5901", 
+                               "-desktop", "xen-vncfb", 
+                               "-listen", "0.0.0.0" };
 	int fake_argc = sizeof(fake_argv) / sizeof(fake_argv[0]);
 	int domid = -1, port = -1;
         char * title = NULL;
+        char * listen = NULL;
 	struct xenfb *xenfb;
 	fd_set readfds;
 	int fd;
@@ -121,6 +124,9 @@
                 case 'u':
                     unused = TRUE;
                     break;
+                case 'l':
+                    listen = strdup(optarg);
+                    break;
                 }
         }
         if (optind != argc) {
@@ -140,6 +146,9 @@
         if (title != NULL)
             fake_argv[4] = title;
 
+        if (listen != NULL)
+            fake_argv[6] = listen;
+
 	signal(SIGPIPE, SIG_IGN);
 
 	xenfb = xenfb_new();

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

                 reply	other threads:[~2006-09-29 20:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20060929205705.GD8564@redhat.com \
    --to=berrange@redhat.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.