kern_shutdown.c (228449) | kern_shutdown.c (228475) |
---|---|
1/*- 2 * Copyright (c) 1986, 1988, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 35 */ 36 37#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1986, 1988, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/kern/kern_shutdown.c 228449 2011-12-13 00:38:50Z eadler $"); | 38__FBSDID("$FreeBSD: head/sys/kern/kern_shutdown.c 228475 2011-12-13 17:59:16Z obrien $"); |
39 40#include "opt_ddb.h" 41#include "opt_kdb.h" 42#include "opt_panic.h" 43#include "opt_sched.h" 44#include "opt_watchdog.h" 45 46#include <sys/param.h> --- 50 unchanged lines hidden (view full) --- 97#include <machine/stdarg.h> 98 99#ifdef KDB 100#ifdef KDB_UNATTENDED 101int debugger_on_panic = 0; 102#else 103int debugger_on_panic = 1; 104#endif | 39 40#include "opt_ddb.h" 41#include "opt_kdb.h" 42#include "opt_panic.h" 43#include "opt_sched.h" 44#include "opt_watchdog.h" 45 46#include <sys/param.h> --- 50 unchanged lines hidden (view full) --- 97#include <machine/stdarg.h> 98 99#ifdef KDB 100#ifdef KDB_UNATTENDED 101int debugger_on_panic = 0; 102#else 103int debugger_on_panic = 1; 104#endif |
105SYSCTL_INT(_debug, OID_AUTO, debugger_on_panic, CTLFLAG_RW | CTLFLAG_TUN, 106 &debugger_on_panic, 0, "Run debugger on kernel panic"); | 105SYSCTL_INT(_debug, OID_AUTO, debugger_on_panic, 106 CTLFLAG_RW | CTLFLAG_SECURE | CTLFLAG_TUN, &debugger_on_panic, 0, 107 "Run debugger on kernel panic"); |
107TUNABLE_INT("debug.debugger_on_panic", &debugger_on_panic); 108 109#ifdef KDB_TRACE 110static int trace_on_panic = 1; 111#else 112static int trace_on_panic = 0; 113#endif | 108TUNABLE_INT("debug.debugger_on_panic", &debugger_on_panic); 109 110#ifdef KDB_TRACE 111static int trace_on_panic = 1; 112#else 113static int trace_on_panic = 0; 114#endif |
114SYSCTL_INT(_debug, OID_AUTO, trace_on_panic, CTLFLAG_RW | CTLFLAG_TUN, 115 &trace_on_panic, 0, "Print stack trace on kernel panic"); | 115SYSCTL_INT(_debug, OID_AUTO, trace_on_panic, 116 CTLFLAG_RW | CTLFLAG_SECURE | CTLFLAG_TUN, &trace_on_panic, 0, 117 "Print stack trace on kernel panic"); |
116TUNABLE_INT("debug.trace_on_panic", &trace_on_panic); 117#endif /* KDB */ 118 119static int sync_on_panic = 0; 120SYSCTL_INT(_kern, OID_AUTO, sync_on_panic, CTLFLAG_RW | CTLFLAG_TUN, 121 &sync_on_panic, 0, "Do a sync before rebooting from a panic"); 122TUNABLE_INT("kern.sync_on_panic", &sync_on_panic); 123 --- 643 unchanged lines hidden --- | 118TUNABLE_INT("debug.trace_on_panic", &trace_on_panic); 119#endif /* KDB */ 120 121static int sync_on_panic = 0; 122SYSCTL_INT(_kern, OID_AUTO, sync_on_panic, CTLFLAG_RW | CTLFLAG_TUN, 123 &sync_on_panic, 0, "Do a sync before rebooting from a panic"); 124TUNABLE_INT("kern.sync_on_panic", &sync_on_panic); 125 --- 643 unchanged lines hidden --- |