diff options
-rw-r--r-- | sbin/sysctl/sysctl.8 | 3 | ||||
-rw-r--r-- | sys/ddb/db_usrreq.c | 4 | ||||
-rw-r--r-- | sys/ddb/db_var.h | 7 | ||||
-rw-r--r-- | sys/kern/subr_prf.c | 8 | ||||
-rw-r--r-- | usr.sbin/sysctl/sysctl.8 | 3 |
5 files changed, 18 insertions, 7 deletions
diff --git a/sbin/sysctl/sysctl.8 b/sbin/sysctl/sysctl.8 index 2024ae4aaa3..9b850e74d21 100644 --- a/sbin/sysctl/sysctl.8 +++ b/sbin/sysctl/sysctl.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sysctl.8,v 1.12 1997/08/19 06:42:42 millert Exp $ +.\" $OpenBSD: sysctl.8,v 1.13 1997/12/29 14:31:18 deraadt Exp $ .\" $NetBSD: sysctl.8,v 1.4 1995/09/30 07:12:49 thorpej Exp $ .\" .\" Copyright (c) 1993 @@ -200,6 +200,7 @@ privilege can change the value. .It ddb.max_width integer yes .It ddb.max_line integer yes .It ddb.tab_stop_width integer yes +.It ddb.panic_ddb integer yes .El .Sh EXAMPLES .Pp diff --git a/sys/ddb/db_usrreq.c b/sys/ddb/db_usrreq.c index fdc7f41ef0d..a303f9243ad 100644 --- a/sys/ddb/db_usrreq.c +++ b/sys/ddb/db_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_usrreq.c,v 1.1 1996/03/30 04:51:31 mickey Exp $ */ +/* $OpenBSD: db_usrreq.c,v 1.2 1997/12/29 14:31:19 deraadt Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff. All rights reserved. @@ -62,6 +62,8 @@ ddb_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) return sysctl_int(oldp, oldlenp, newp, newlen, &db_tab_stop_width); case DBCTL_MAXLINE: return sysctl_int(oldp, oldlenp, newp, newlen, &db_max_line); + case DBCTL_PANICDDB: + return sysctl_int(oldp, oldlenp, newp, newlen, &db_panic_ddb); default: return (EOPNOTSUPP); } diff --git a/sys/ddb/db_var.h b/sys/ddb/db_var.h index 439cd0c15eb..ab3ad37a531 100644 --- a/sys/ddb/db_var.h +++ b/sys/ddb/db_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_var.h,v 1.2 1996/03/30 04:51:29 mickey Exp $ */ +/* $OpenBSD: db_var.h,v 1.3 1997/12/29 14:31:19 deraadt Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff. All rights reserved. @@ -44,7 +44,8 @@ #define DBCTL_MAXWIDTH 2 #define DBCTL_MAXLINE 3 #define DBCTL_TABSTOP 4 -#define DBCTL_MAXID 5 +#define DBCTL_PANICDDB 5 +#define DBCTL_MAXID 6 #define CTL_DDB_NAMES { \ { NULL, 0 }, \ @@ -52,6 +53,7 @@ { "max_width", CTLTYPE_INT }, \ { "max_line", CTLTYPE_INT }, \ { "tab_stop_width", CTLTYPE_INT },\ + { "panic_ddb", CTLTYPE_INT }, \ } #ifdef _KERNEL @@ -60,6 +62,7 @@ extern int db_radix; extern int db_max_width; extern int db_tab_stop_width; extern int db_max_line; +extern int db_panic_ddb; int ddb_sysctl __P((int *, u_int, void *, size_t *, void *, size_t, struct proc *)); diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index 50296436ab5..d2dbc743e94 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_prf.c,v 1.18 1997/12/28 23:39:28 niklas Exp $ */ +/* $OpenBSD: subr_prf.c,v 1.19 1997/12/29 14:31:16 deraadt Exp $ */ /* $NetBSD: subr_prf.c,v 1.45 1997/10/24 18:14:25 chuck Exp $ */ /*- @@ -108,6 +108,9 @@ int consintr = 1; /* ok to handle console interrupts? */ extern int log_open; /* subr_log: is /dev/klog open? */ const char *panicstr; /* arg to first call to panic (used as a flag to indicate that panic has already been called). */ +#ifdef DDB +int db_panic_ddb = 1; +#endif /* * v_putc: routine to putc on virtual console @@ -188,7 +191,8 @@ panic(fmt, va_alist) kdbpanic(); #endif #ifdef DDB - Debugger(); + if (db_panic_ddb) + Debugger(); #endif boot(bootopt); } diff --git a/usr.sbin/sysctl/sysctl.8 b/usr.sbin/sysctl/sysctl.8 index 2024ae4aaa3..9b850e74d21 100644 --- a/usr.sbin/sysctl/sysctl.8 +++ b/usr.sbin/sysctl/sysctl.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sysctl.8,v 1.12 1997/08/19 06:42:42 millert Exp $ +.\" $OpenBSD: sysctl.8,v 1.13 1997/12/29 14:31:18 deraadt Exp $ .\" $NetBSD: sysctl.8,v 1.4 1995/09/30 07:12:49 thorpej Exp $ .\" .\" Copyright (c) 1993 @@ -200,6 +200,7 @@ privilege can change the value. .It ddb.max_width integer yes .It ddb.max_line integer yes .It ddb.tab_stop_width integer yes +.It ddb.panic_ddb integer yes .El .Sh EXAMPLES .Pp |