From 43347f8e5f17cf246d2199b4db5b899e8bb08557 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 28 Nov 2009 17:32:20 +0100 Subject: Add -H option to halt on panic 2005-12-29 Soeren D. Schulze * i386/i386at/model_dep.c (reboot_on_panic) [!MACH_KBD]: New variable. (c_boot_entry) [!MACH_KBD]: Set reboot_on_panic to 0 if kernel_cmdline contains '-H'. * kern/debug.c (panic): Call halt_all_cpus with reboot_on_panic as argument. --- i386/i386at/model_dep.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'i386') diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c index 573ca6d..3ebe2e6 100644 --- a/i386/i386at/model_dep.c +++ b/i386/i386at/model_dep.c @@ -107,6 +107,10 @@ void inittodr(); /* forward */ int rebootflag = 0; /* exported to kdintr */ +#if ! MACH_KBD +boolean_t reboot_on_panic = 1; +#endif + /* XX interrupt stack pointer and highwater mark, for locore.S. */ vm_offset_t int_stack_top, int_stack_high; @@ -428,6 +432,11 @@ void c_boot_entry(vm_offset_t bi) cninit(); /* need console for debugger */ Debugger("init"); } +#else + if (strstr (kernel_cmdline, "-H ")) + { + reboot_on_panic = 0; + } #endif /* MACH_KDB */ machine_slot[0].is_cpu = TRUE; -- cgit v1.2.3