ia64/xen-unstable

changeset 3801:69f8d9612f8d

bitkeeper revision 1.1188 (420d5244F1WAs2mvIW8E0-0RB5AlRw)

Subject: [PATCH] dm-destroy.patch

Clicking on the power off button calls xm destroy as well.

Signed-off-by: Arun Sharma <arun.sharma@intel.com>
Signed-off-by: ian@xensource.com
author iap10@freefall.cl.cam.ac.uk
date Sat Feb 12 00:48:04 2005 +0000 (2005-02-12)
parents 16e48b864f0f
children b1a798ce6dbf
files tools/ioemu/gui/gui.cc
line diff
     1.1 --- a/tools/ioemu/gui/gui.cc	Sat Feb 12 00:43:32 2005 +0000
     1.2 +++ b/tools/ioemu/gui/gui.cc	Sat Feb 12 00:48:04 2005 +0000
     1.3 @@ -293,6 +293,10 @@ bx_gui_c::reset_handler(void)
     1.4        BX_CPU(i)->reset(BX_RESET_HARDWARE);
     1.5  }
     1.6  
     1.7 +#ifdef BX_USE_VMX
     1.8 +char xm_destroy[PATH_MAX];
     1.9 +#endif
    1.10 +
    1.11    void
    1.12  bx_gui_c::power_handler(void)
    1.13  {
    1.14 @@ -300,9 +304,14 @@ bx_gui_c::power_handler(void)
    1.15    // to quit.  Change panics to fatal for the GUI and then do a panic.
    1.16    bx_user_quit = 1;
    1.17    LOG_THIS setonoff(LOGLEV_PANIC, ACT_FATAL);
    1.18 -  BX_PANIC (("POWER button turned off."));
    1.19 +  BX_INFO(("POWER button turned off."));
    1.20    // shouldn't reach this point, but if you do, QUIT!!!
    1.21    fprintf (stderr, "Bochs is exiting because you pressed the power button.\n");
    1.22 +  snprintf(xm_destroy, PATH_MAX, "xm destroy %d", domid);
    1.23 +  BX_INFO(("executing: %s\n", xm_destroy));
    1.24 +  if (system(xm_destroy) != 0) {
    1.25 +        BX_PANIC(("failed\n"));
    1.26 +  }
    1.27    BX_EXIT (1);
    1.28  }
    1.29