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. Index: i386/i386at/model_dep.c =================================================================== --- i386/i386at/model_dep.c.orig 2007-02-11 14:51:13.000000000 +0200 +++ i386/i386at/model_dep.c 2007-04-05 07:29:39.000000000 +0300 @@ -96,6 +96,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; @@ -367,6 +371,11 @@ void c_boot_entry(vm_offset_t bi) cninit(); /* need console for debugger */ Debugger(); } +#else + if (strstr (kernel_cmdline, "-H ")) + { + reboot_on_panic = 0; + } #endif /* MACH_KDB */ machine_slot[0].is_cpu = TRUE; Index: kern/debug.c =================================================================== --- kern/debug.c.orig 2006-11-14 03:58:57.000000000 +0200 +++ kern/debug.c 2007-04-05 07:29:39.000000000 +0300 @@ -124,6 +124,10 @@ panic_init() } } +#if ! MACH_KBD +extern boolean_t reboot_on_panic; +#endif + /*VARARGS1*/ void panic(const char *s, ...) @@ -165,7 +169,7 @@ panic(const char *s, ...) #if MACH_KDB Debugger("panic"); #else - halt_all_cpus (1); + halt_all_cpus (reboot_on_panic); #endif }