ia64/xen-unstable

changeset 8215:b8ba1bbba882

Set the device model windows title as the domain name
This helps when creating multile vmx domain.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Sat Dec 03 17:58:31 2005 +0100 (2005-12-03)
parents d234a8cfc4ca
children fd7c4221fc56
files tools/ioemu/sdl.c tools/ioemu/vl.c tools/ioemu/vl.h tools/ioemu/vnc.c tools/python/xen/xend/image.py
line diff
     1.1 --- a/tools/ioemu/sdl.c	Sat Dec 03 17:41:16 2005 +0100
     1.2 +++ b/tools/ioemu/sdl.c	Sat Dec 03 17:58:31 2005 +0100
     1.3 @@ -358,14 +358,14 @@ static void sdl_process_key(SDL_Keyboard
     1.4  static void sdl_update_caption(void)
     1.5  {
     1.6      char buf[1024];
     1.7 -    strcpy(buf, "VTXen");
     1.8 +    strcpy(buf, domain_name);
     1.9      if (!vm_running) {
    1.10          strcat(buf, " [Stopped]");
    1.11      }
    1.12      if (gui_grab) {
    1.13          strcat(buf, " - Press Ctrl-Alt to exit grab");
    1.14      }
    1.15 -    SDL_WM_SetCaption(buf, "VTXen");
    1.16 +    SDL_WM_SetCaption(buf, domain_name);
    1.17  }
    1.18  
    1.19  static void sdl_grab_start(void)
     2.1 --- a/tools/ioemu/vl.c	Sat Dec 03 17:41:16 2005 +0100
     2.2 +++ b/tools/ioemu/vl.c	Sat Dec 03 17:58:31 2005 +0100
     2.3 @@ -125,6 +125,7 @@ static char network_script[1024];
     2.4  int pit_min_timer_count = 0;
     2.5  int nb_nics;
     2.6  char bridge[16];
     2.7 +char domain_name[1024] = { 'V', 'T', 'X', 'E', 'N', '-'};
     2.8  NetDriverState nd_table[MAX_NICS];
     2.9  QEMUTimer *gui_timer;
    2.10  QEMUTimer *polling_timer;
    2.11 @@ -2238,6 +2239,7 @@ void help(void)
    2.12             "-s              wait gdb connection to port %d\n"
    2.13             "-p port         ioreq port for xen\n"
    2.14             "-d domain       domain that we're serving\n"
    2.15 +           "-domain-namn    domain name that we're serving\n"
    2.16             "-hdachs c,h,s   force hard disk 0 geometry (usually qemu can guess it)\n"
    2.17             "-L path         set the directory for the BIOS and VGA BIOS\n"
    2.18  #ifdef USE_CODE_COPY
    2.19 @@ -2335,6 +2337,7 @@ enum {
    2.20      QEMU_OPTION_g,
    2.21      QEMU_OPTION_std_vga,
    2.22      QEMU_OPTION_monitor,
    2.23 +    QEMU_OPTION_domainname,
    2.24      QEMU_OPTION_serial,
    2.25      QEMU_OPTION_loadvm,
    2.26      QEMU_OPTION_full_screen,
    2.27 @@ -2408,6 +2411,7 @@ const QEMUOption qemu_options[] = {
    2.28      { "isa", 0, QEMU_OPTION_isa },
    2.29      { "std-vga", 0, QEMU_OPTION_std_vga },
    2.30      { "monitor", 1, QEMU_OPTION_monitor },
    2.31 +    { "domain-name", 1, QEMU_OPTION_domainname },
    2.32      { "serial", 1, QEMU_OPTION_serial },
    2.33      { "loadvm", HAS_ARG, QEMU_OPTION_loadvm },
    2.34      { "full-screen", 0, QEMU_OPTION_full_screen },
    2.35 @@ -3024,6 +3028,10 @@ int main(int argc, char **argv)
    2.36              case QEMU_OPTION_full_screen:
    2.37                  full_screen = 1;
    2.38                  break;
    2.39 +            case QEMU_OPTION_domainname:
    2.40 +                strncat(domain_name, optarg, sizeof(domain_name) - 20);
    2.41 +                break;
    2.42 +
    2.43              }
    2.44          }
    2.45      }
     3.1 --- a/tools/ioemu/vl.h	Sat Dec 03 17:41:16 2005 +0100
     3.2 +++ b/tools/ioemu/vl.h	Sat Dec 03 17:58:31 2005 +0100
     3.3 @@ -796,4 +796,5 @@ int gdbserver_start(int port);
     3.4  void update_select_wakeup_events(void);
     3.5  void tun_receive_handler();
     3.6  
     3.7 +extern char domain_name[];
     3.8  #endif /* VL_H */
     4.1 --- a/tools/ioemu/vnc.c	Sat Dec 03 17:41:16 2005 +0100
     4.2 +++ b/tools/ioemu/vnc.c	Sat Dec 03 17:58:31 2005 +0100
     4.3 @@ -526,7 +526,7 @@ void vnc_display_init(DisplayState *ds, 
     4.4  	} else
     4.5  		screen->frameBuffer = malloc(640*400*2);
     4.6  
     4.7 -	screen->desktopName = "QEMU/VNC";
     4.8 +	screen->desktopName = domain_name;
     4.9  	screen->cursor = 0;
    4.10  	screen->kbdAddEvent = vnc_process_key;
    4.11  	screen->ptrAddEvent = vnc_process_mouse;
     5.1 --- a/tools/python/xen/xend/image.py	Sat Dec 03 17:41:16 2005 +0100
     5.2 +++ b/tools/python/xen/xend/image.py	Sat Dec 03 17:58:31 2005 +0100
     5.3 @@ -259,6 +259,7 @@ class VmxImageHandler(ImageHandler):
     5.4  
     5.5          # Handle disk/network related options
     5.6          mac = None
     5.7 +        ret.append("-domain-name %s" % self.vm.info['name'])
     5.8          for (name, info) in deviceConfig:
     5.9              if name == 'vbd':
    5.10                 uname = sxp.child_value(info, 'uname')