summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2009-11-28 17:32:20 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2009-11-28 17:32:20 +0100
commit43347f8e5f17cf246d2199b4db5b899e8bb08557 (patch)
treed6ab2b87ea4f8c3a0296183d590a6bab72696569 /kern
parent6a47810d44ab7f1f0c2c93229797bf7c2f232ff7 (diff)
Add -H option to halt on panic
2005-12-29 Soeren D. Schulze <soeren.d.schulze@gmx.de> * 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.
Diffstat (limited to 'kern')
-rw-r--r--kern/debug.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kern/debug.c b/kern/debug.c
index 6644340..109d920 100644
--- a/kern/debug.c
+++ b/kern/debug.c
@@ -126,6 +126,10 @@ panic_init(void)
}
}
+#if ! MACH_KBD
+extern boolean_t reboot_on_panic;
+#endif
+
/*VARARGS1*/
void
panic(const char *s, ...)
@@ -167,7 +171,7 @@ panic(const char *s, ...)
delay (1000000); /* microseconds */
}
- halt_all_cpus (1);
+ halt_all_cpus (reboot_on_panic);
#endif
}