From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Daniel P. Berrange" Subject: [Patch] vnclisten for paravirt FB Date: Fri, 29 Sep 2006 21:57:05 +0100 Message-ID: <20060929205705.GD8564@redhat.com> Reply-To: "Daniel P. Berrange" Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="mojUlQ0s9EVzWg2t" Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --mojUlQ0s9EVzWg2t Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 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 -=| --mojUlQ0s9EVzWg2t Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="xen-vnclisten-pvfb.patch" 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(); --mojUlQ0s9EVzWg2t Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --mojUlQ0s9EVzWg2t--