ia64/xen-unstable

changeset 10952:646092d50e82

[qemu patches] Update patches for changeset 10923:155385a02d.

Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
author chris@kneesaa.uk.xensource.com
date Thu Aug 03 19:19:27 2006 +0100 (2006-08-03)
parents 155385a02d0b
children ea04335d238b
files tools/ioemu/patches/series tools/ioemu/patches/xenstore-write-vnc-port
line diff
     1.1 --- a/tools/ioemu/patches/series	Thu Aug 03 19:14:41 2006 +0100
     1.2 +++ b/tools/ioemu/patches/series	Thu Aug 03 19:19:27 2006 +0100
     1.3 @@ -36,3 +36,4 @@ vnc-start-vncviewer
     1.4  vnc-title-domain-name
     1.5  vnc-access-monitor-vt
     1.6  xenstore-block-device-config
     1.7 +xenstore-write-vnc-port
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/tools/ioemu/patches/xenstore-write-vnc-port	Thu Aug 03 19:19:27 2006 +0100
     2.3 @@ -0,0 +1,60 @@
     2.4 +Index: ioemu/xenstore.c
     2.5 +===================================================================
     2.6 +--- ioemu.orig/xenstore.c	2006-08-03 19:17:18.496119877 +0100
     2.7 ++++ ioemu/xenstore.c	2006-08-03 19:18:29.428258503 +0100
     2.8 +@@ -185,3 +185,31 @@
     2.9 +     free(image);
    2.10 +     free(vec);
    2.11 + }
    2.12 ++
    2.13 ++void xenstore_write_vncport(int display)
    2.14 ++{
    2.15 ++    char *buf = NULL, *path;
    2.16 ++    char *portstr = NULL;
    2.17 ++
    2.18 ++    if (xsh == NULL)
    2.19 ++	return;
    2.20 ++
    2.21 ++    path = xs_get_domain_path(xsh, domid);
    2.22 ++    if (path == NULL) {
    2.23 ++        fprintf(logfile, "xs_get_domain_path() error\n");
    2.24 ++        goto out;
    2.25 ++    }
    2.26 ++
    2.27 ++    if (pasprintf(&buf, "%s/console/vnc-port", path) == -1)
    2.28 ++	goto out;
    2.29 ++
    2.30 ++    if (pasprintf(&portstr, "%d", 5900 + display) == -1)
    2.31 ++	goto out;
    2.32 ++
    2.33 ++    if (xs_write(xsh, XBT_NULL, buf, portstr, strlen(portstr)) == 0)
    2.34 ++        fprintf(logfile, "xs_write() vncport failed\n");
    2.35 ++
    2.36 ++ out:
    2.37 ++    free(portstr);
    2.38 ++    free(buf);
    2.39 ++}
    2.40 +Index: ioemu/vl.c
    2.41 +===================================================================
    2.42 +--- ioemu.orig/vl.c	2006-08-03 19:17:18.499119544 +0100
    2.43 ++++ ioemu/vl.c	2006-08-03 19:18:29.427258614 +0100
    2.44 +@@ -5954,6 +5954,7 @@
    2.45 + 	vnc_display_init(ds, vnc_display);
    2.46 + 	if (vncviewer)
    2.47 + 	    vnc_start_viewer(vnc_display);
    2.48 ++	xenstore_write_vncport(vnc_display);
    2.49 +     } else {
    2.50 + #if defined(CONFIG_SDL)
    2.51 +         sdl_display_init(ds, full_screen);
    2.52 +Index: ioemu/vl.h
    2.53 +===================================================================
    2.54 +--- ioemu.orig/vl.h	2006-08-03 19:17:18.501119323 +0100
    2.55 ++++ ioemu/vl.h	2006-08-03 19:18:29.428258503 +0100
    2.56 +@@ -1111,6 +1111,7 @@
    2.57 + int xenstore_fd(void);
    2.58 + void xenstore_process_event(void *opaque);
    2.59 + void xenstore_check_new_media_present(int timeout);
    2.60 ++void xenstore_write_vncport(int vnc_display);
    2.61 + 
    2.62 + 
    2.63 + void kqemu_record_dump(void);