diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-03-30 00:07:23 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-03-30 00:07:23 +0100 |
commit | 5ed66abe17f3f16ff1323695daea15785c2701d4 (patch) | |
tree | 033c3b50a6b30106aaf76723cbbf2492b88ea029 | |
parent | 4b4593251a2c222a642a84533e0280a9ec291f6d (diff) | |
download | xen-5ed66abe17f3f16ff1323695daea15785c2701d4.tar.gz xen-5ed66abe17f3f16ff1323695daea15785c2701d4.tar.bz2 xen-5ed66abe17f3f16ff1323695daea15785c2701d4.zip |
Xen waits 5 seconds to reboot when domain 0 crashes, giving
time to read crash messages.
From: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Keir Fraser <keir@xensource.com>
-rw-r--r-- | xen/common/domain.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xen/common/domain.c b/xen/common/domain.c index e98b4994d3..b582719545 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -19,6 +19,7 @@ #include <xen/rangeset.h> #include <xen/guest_access.h> #include <xen/hypercall.h> +#include <xen/delay.h> #include <asm/debugger.h> #include <public/dom0_ops.h> #include <public/sched.h> @@ -222,6 +223,13 @@ void domain_shutdown(struct domain *d, u8 reason) printk("Domain 0 halted: halting machine.\n"); machine_halt(); } + else if ( reason == SHUTDOWN_crash ) + { + printk("Domain 0 crashed: rebooting machine in 5 seconds.\n"); + watchdog_disable(); + mdelay(5000); + machine_restart(0); + } else { printk("Domain 0 shutdown: rebooting machine.\n"); |