summaryrefslogtreecommitdiff
path: root/sys/kern/subr_prf.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2002-05-20 22:16:37 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2002-05-20 22:16:37 +0000
commit631844657fe6c44d71889c3f19c60c52d836cca0 (patch)
treefccca4c0d7a9b677509c0377c14cde7df91a53a2 /sys/kern/subr_prf.c
parent9b2b4d346ebaf226d6d2b26a380bfc17e7770f90 (diff)
Add one more level to the kern.splassert sysctl.
0 - do nothing. 1 - small message on error (function name and the levels). 2 - big message on error (function name, levels and traceback (if possible)). 3 - panic. After suggestion from deraadt@.
Diffstat (limited to 'sys/kern/subr_prf.c')
-rw-r--r--sys/kern/subr_prf.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c
index c417e06e494..cb4f83203ec 100644
--- a/sys/kern/subr_prf.c
+++ b/sys/kern/subr_prf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_prf.c,v 1.43 2002/05/18 18:33:42 art Exp $ */
+/* $OpenBSD: subr_prf.c,v 1.44 2002/05/20 22:16:36 art Exp $ */
/* $NetBSD: subr_prf.c,v 1.45 1997/10/24 18:14:25 chuck Exp $ */
/*-
@@ -234,12 +234,16 @@ splassert_fail(int wantipl, int haveipl, const char *func)
{
printf("splassert: %s: want %d have %d\n", func, wantipl, haveipl);
- if (splassert_ctl > 1) {
- panic("spl assertion failure in %s", func);
- } else {
+ switch (splassert_ctl) {
+ case 1:
+ break;
+ case 2:
#ifdef DDB
db_stack_dump();
#endif
+ break;
+ default:
+ panic("spl assertion failure in %s", func);
}
}