kern_shutdown.c (89522) | kern_shutdown.c (89601) |
---|---|
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. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 | 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. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 |
39 * $FreeBSD: head/sys/kern/kern_shutdown.c 89522 2002-01-18 22:45:29Z nik $ | 39 * $FreeBSD: head/sys/kern/kern_shutdown.c 89601 2002-01-21 01:16:11Z sobomax $ |
40 */ 41 42#include "opt_ddb.h" 43#include "opt_hw_wdog.h" 44#include "opt_panic.h" 45#include "opt_show_busybufs.h" 46 47#include <sys/param.h> 48#include <sys/systm.h> 49#include <sys/bio.h> 50#include <sys/buf.h> 51#include <sys/conf.h> 52#include <sys/cons.h> 53#include <sys/disklabel.h> 54#include <sys/eventhandler.h> 55#include <sys/kernel.h> 56#include <sys/kthread.h> | 40 */ 41 42#include "opt_ddb.h" 43#include "opt_hw_wdog.h" 44#include "opt_panic.h" 45#include "opt_show_busybufs.h" 46 47#include <sys/param.h> 48#include <sys/systm.h> 49#include <sys/bio.h> 50#include <sys/buf.h> 51#include <sys/conf.h> 52#include <sys/cons.h> 53#include <sys/disklabel.h> 54#include <sys/eventhandler.h> 55#include <sys/kernel.h> 56#include <sys/kthread.h> |
57#include <sys/malloc.h> |
|
57#include <sys/mount.h> 58#include <sys/proc.h> 59#include <sys/reboot.h> 60#include <sys/resourcevar.h> 61#include <sys/smp.h> /* smp_active */ 62#include <sys/sysctl.h> 63#include <sys/sysproto.h> 64#include <sys/vnode.h> --- 387 unchanged lines hidden (view full) --- 452 return (0); 453} 454 455 456/* ARGSUSED */ 457static void 458dump_conf(void *dummy) 459{ | 58#include <sys/mount.h> 59#include <sys/proc.h> 60#include <sys/reboot.h> 61#include <sys/resourcevar.h> 62#include <sys/smp.h> /* smp_active */ 63#include <sys/sysctl.h> 64#include <sys/sysproto.h> 65#include <sys/vnode.h> --- 387 unchanged lines hidden (view full) --- 453 return (0); 454} 455 456 457/* ARGSUSED */ 458static void 459dump_conf(void *dummy) 460{ |
461 char *path; 462 dev_t dev; 463 464 path = malloc(MNAMELEN, M_TEMP, M_WAITOK); 465 if (TUNABLE_STR_FETCH("dumpdev", path, MNAMELEN) != 0) { 466 dev = getdiskbyname(path); 467 if (dev != NODEV) 468 dumpdev = dev; 469 } 470 free(path, M_TEMP); |
|
460 if (setdumpdev(dumpdev) != 0) 461 dumpdev = NODEV; 462} 463 464SYSINIT(dump_conf, SI_SUB_DUMP_CONF, SI_ORDER_FIRST, dump_conf, NULL) 465 466static int 467sysctl_kern_dumpdev(SYSCTL_HANDLER_ARGS) --- 219 unchanged lines hidden --- | 471 if (setdumpdev(dumpdev) != 0) 472 dumpdev = NODEV; 473} 474 475SYSINIT(dump_conf, SI_SUB_DUMP_CONF, SI_ORDER_FIRST, dump_conf, NULL) 476 477static int 478sysctl_kern_dumpdev(SYSCTL_HANDLER_ARGS) --- 219 unchanged lines hidden --- |