ia64/xen-unstable

changeset 10805:2b1a49dd1273

[qemu] Use domain-name in VNC window title.
Set the VNC window title with domain-name.

Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
author chris@kneesaa.uk.xensource.com
date Wed Jul 26 14:26:03 2006 +0100 (2006-07-26)
parents 060025203f54
children 4c2a281cd1e7
files tools/ioemu/patches/series tools/ioemu/patches/vnc-title-domain-name tools/ioemu/vnc.c
line diff
     1.1 --- a/tools/ioemu/patches/series	Wed Jul 26 14:20:13 2006 +0100
     1.2 +++ b/tools/ioemu/patches/series	Wed Jul 26 14:26:03 2006 +0100
     1.3 @@ -32,3 +32,4 @@ acpi-poweroff-support
     1.4  vnc-cleanup
     1.5  vnc-fixes
     1.6  vnc-start-vncviewer
     1.7 +vnc-title-domain-name
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/tools/ioemu/patches/vnc-title-domain-name	Wed Jul 26 14:26:03 2006 +0100
     2.3 @@ -0,0 +1,25 @@
     2.4 +Index: ioemu/vnc.c
     2.5 +===================================================================
     2.6 +--- ioemu.orig/vnc.c	2006-07-26 14:23:52.426074956 +0100
     2.7 ++++ ioemu/vnc.c	2006-07-26 14:24:15.210558295 +0100
     2.8 +@@ -850,6 +850,7 @@
     2.9 + 
    2.10 + static int protocol_client_init(VncState *vs, char *data, size_t len)
    2.11 + {
    2.12 ++    size_t l;
    2.13 +     char pad[3] = { 0, 0, 0 };
    2.14 + 
    2.15 +     vs->width = vs->ds->width;
    2.16 +@@ -886,8 +887,10 @@
    2.17 + 	
    2.18 +     vnc_write(vs, pad, 3);           /* padding */
    2.19 + 
    2.20 +-    vnc_write_u32(vs, 4);        
    2.21 +-    vnc_write(vs, "QEMU", 4);
    2.22 ++    l = strlen(domain_name); 
    2.23 ++    vnc_write_u32(vs, l);        
    2.24 ++    vnc_write(vs, domain_name, l);
    2.25 ++
    2.26 +     vnc_flush(vs);
    2.27 + 
    2.28 +     vnc_read_when(vs, protocol_client_msg, 1);
     3.1 --- a/tools/ioemu/vnc.c	Wed Jul 26 14:20:13 2006 +0100
     3.2 +++ b/tools/ioemu/vnc.c	Wed Jul 26 14:26:03 2006 +0100
     3.3 @@ -850,6 +850,7 @@ static int protocol_client_msg(VncState 
     3.4  
     3.5  static int protocol_client_init(VncState *vs, char *data, size_t len)
     3.6  {
     3.7 +    size_t l;
     3.8      char pad[3] = { 0, 0, 0 };
     3.9  
    3.10      vs->width = vs->ds->width;
    3.11 @@ -886,8 +887,10 @@ static int protocol_client_init(VncState
    3.12  	
    3.13      vnc_write(vs, pad, 3);           /* padding */
    3.14  
    3.15 -    vnc_write_u32(vs, 4);        
    3.16 -    vnc_write(vs, "QEMU", 4);
    3.17 +    l = strlen(domain_name); 
    3.18 +    vnc_write_u32(vs, l);        
    3.19 +    vnc_write(vs, domain_name, l);
    3.20 +
    3.21      vnc_flush(vs);
    3.22  
    3.23      vnc_read_when(vs, protocol_client_msg, 1);