WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [qemu] Write the port number where the vn

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [qemu] Write the port number where the vnc server is listening to xenstore.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 03 Aug 2006 19:40:23 +0000
Delivery-date: Thu, 03 Aug 2006 12:43:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User chris@xxxxxxxxxxxxxxxxxxxxxxxx
# Node ID 155385a02d0b3c57b079a3ce234d057e812605fa
# Parent  955f02563a13288d227c3d332c90a3f644a4d9bf
[qemu] Write the port number where the vnc server is listening to xenstore.

Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxxx>
---
 tools/ioemu/vl.c       |    1 +
 tools/ioemu/vl.h       |    1 +
 tools/ioemu/xenstore.c |   28 ++++++++++++++++++++++++++++
 3 files changed, 30 insertions(+)

diff -r 955f02563a13 -r 155385a02d0b tools/ioemu/vl.c
--- a/tools/ioemu/vl.c  Thu Aug 03 18:34:03 2006 +0100
+++ b/tools/ioemu/vl.c  Thu Aug 03 19:14:41 2006 +0100
@@ -5954,6 +5954,7 @@ int main(int argc, char **argv)
        vnc_display_init(ds, vnc_display);
        if (vncviewer)
            vnc_start_viewer(vnc_display);
+       xenstore_write_vncport(vnc_display);
     } else {
 #if defined(CONFIG_SDL)
         sdl_display_init(ds, full_screen);
diff -r 955f02563a13 -r 155385a02d0b tools/ioemu/vl.h
--- a/tools/ioemu/vl.h  Thu Aug 03 18:34:03 2006 +0100
+++ b/tools/ioemu/vl.h  Thu Aug 03 19:14:41 2006 +0100
@@ -1111,6 +1111,7 @@ int xenstore_fd(void);
 int xenstore_fd(void);
 void xenstore_process_event(void *opaque);
 void xenstore_check_new_media_present(int timeout);
+void xenstore_write_vncport(int vnc_display);
 
 
 void kqemu_record_dump(void);
diff -r 955f02563a13 -r 155385a02d0b tools/ioemu/xenstore.c
--- a/tools/ioemu/xenstore.c    Thu Aug 03 18:34:03 2006 +0100
+++ b/tools/ioemu/xenstore.c    Thu Aug 03 19:14:41 2006 +0100
@@ -185,3 +185,31 @@ void xenstore_process_event(void *opaque
     free(image);
     free(vec);
 }
+
+void xenstore_write_vncport(int display)
+{
+    char *buf = NULL, *path;
+    char *portstr = NULL;
+
+    if (xsh == NULL)
+       return;
+
+    path = xs_get_domain_path(xsh, domid);
+    if (path == NULL) {
+        fprintf(logfile, "xs_get_domain_path() error\n");
+        goto out;
+    }
+
+    if (pasprintf(&buf, "%s/console/vnc-port", path) == -1)
+       goto out;
+
+    if (pasprintf(&portstr, "%d", 5900 + display) == -1)
+       goto out;
+
+    if (xs_write(xsh, XBT_NULL, buf, portstr, strlen(portstr)) == 0)
+        fprintf(logfile, "xs_write() vncport failed\n");
+
+ out:
+    free(portstr);
+    free(buf);
+}

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [qemu] Write the port number where the vnc server is listening to xenstore., Xen patchbot-unstable <=