All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch] vnclisten for paravirt FB
@ 2006-09-29 20:57 Daniel P. Berrange
  0 siblings, 0 replies; only message in thread
From: Daniel P. Berrange @ 2006-09-29 20:57 UTC (permalink / raw)
  To: xen-devel

[-- 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-09-29 20:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-29 20:57 [Patch] vnclisten for paravirt FB Daniel P. Berrange

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.