Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern remove kern.panic_now -- crashme panic node replace...
details: https://anonhg.NetBSD.org/src/rev/0c3528635d3f
branches: trunk
changeset: 447537:0c3528635d3f
user: mrg <mrg%NetBSD.org@localhost>
date: Tue Jan 15 07:11:23 2019 +0000
description:
remove kern.panic_now -- crashme panic node replaces it.
diffstat:
sys/kern/init_sysctl.c | 36 ++----------------------------------
1 files changed, 2 insertions(+), 34 deletions(-)
diffs (71 lines):
diff -r d90c6033ee13 -r 0c3528635d3f sys/kern/init_sysctl.c
--- a/sys/kern/init_sysctl.c Tue Jan 15 07:01:01 2019 +0000
+++ b/sys/kern/init_sysctl.c Tue Jan 15 07:11:23 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: init_sysctl.c,v 1.221 2018/12/05 18:16:51 christos Exp $ */
+/* $NetBSD: init_sysctl.c,v 1.222 2019/01/15 07:11:23 mrg Exp $ */
/*-
* Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.221 2018/12/05 18:16:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.222 2019/01/15 07:11:23 mrg Exp $");
#include "opt_sysv.h"
#include "opt_compat_netbsd.h"
@@ -108,9 +108,6 @@
return error;
}
-#ifdef DIAGNOSTIC
-static int sysctl_kern_trigger_panic(SYSCTLFN_PROTO);
-#endif
static int sysctl_kern_maxvnodes(SYSCTLFN_PROTO);
static int sysctl_kern_messages(SYSCTLFN_PROTO);
static int sysctl_kern_rtc_offset(SYSCTLFN_PROTO);
@@ -499,14 +496,6 @@
SYSCTL_DESCR("Perform a crash dump on system panic"),
NULL, 0, &dumponpanic, 0,
CTL_KERN, KERN_DUMP_ON_PANIC, CTL_EOL);
-#ifdef DIAGNOSTIC
- sysctl_createv(clog, 0, NULL, NULL,
- CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
- CTLTYPE_INT, "panic_now",
- SYSCTL_DESCR("Trigger a panic"),
- sysctl_kern_trigger_panic, 0, NULL, 0,
- CTL_KERN, CTL_CREATE, CTL_EOL);
-#endif
sysctl_createv(clog, 0, NULL, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_INT, "root_partition",
@@ -703,27 +692,6 @@
* ********************************************************************
*/
-#ifdef DIAGNOSTIC
-static int
-sysctl_kern_trigger_panic(SYSCTLFN_ARGS)
-{
- int newtrig, error;
- struct sysctlnode node;
-
- newtrig = 0;
- node = *rnode;
- node.sysctl_data = &newtrig;
- error = sysctl_lookup(SYSCTLFN_CALL(&node));
- if (error || newp == NULL)
- return (error);
-
- if (newtrig != 0)
- panic("Panic triggered");
-
- return (error);
-}
-#endif
-
/*
* sysctl helper routine for kern.maxvnodes. Drain vnodes if
* new value is lower than desiredvnodes and then calls reinit
Home |
Main Index |
Thread Index |
Old Index