2 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH REBOOT 3C "Mar 22, 2004"
8 reboot \- reboot system or halt processor
12 #include <sys/reboot.h>
14 \fBint\fR \fBreboot\fR(\fBint\fR \fIhowto\fR, \fBchar *\fR\fIbootargs\fR);
20 The \fBreboot()\fR function reboots the system. The \fIhowto\fR argument
21 specifies the behavior of the system while rebooting and is a mask constructed
22 by a bitwise-inclusive-OR of flags from the following list:
26 \fB\fBRB_AUTOBOOT\fR\fR
29 The machine is rebooted from the root filesystem on the default boot device.
30 This is the default behavior. See \fBboot\fR(1M) and \fBkernel\fR(1M).
39 The processor is simply halted; no reboot takes place. This option should be
46 \fB\fBRB_ASKNAME\fR\fR
49 Interpreted by the bootstrap program and kernel, causing the user to be asked
50 for pathnames during the bootstrap.
59 The system is forced to panic immediately without any further processing and a
60 crash dump is written to the dump device (see \fBdumpadm\fR(1M)) before
66 Any other \fIhowto\fR argument causes the kernel file to boot.
69 The interpretation of the \fIbootargs\fR argument is platform-dependent.
73 Upon successful completion, \fBreboot()\fR never returns. Otherwise,
74 \fB\(mi1\fR is returned and \fBerrno\fR is set to indicate the error.
78 The \fBreboot()\fR function will fail if:
85 The {\fBPRIV_SYS_CONFIG\fR} privilege is not asserted in the effective set of
92 \fBIntro\fR(1M), \fBboot\fR(1M), \fBdumpadm\fR(1M), \fBhalt\fR(1M),
93 \fBinit\fR(1M), \fBkernel\fR(1M), \fBreboot\fR(1M), \fBuadmin\fR(2)