'\" te .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved. .TH reboot 3C "22 Mar 2004" "SunOS 5.11" "Standard C Library Functions" .SH NAME reboot \- reboot system or halt processor .SH SYNOPSIS .LP .nf #include \fBint\fR \fBreboot\fR(\fBint\fR \fIhowto\fR, \fBchar *\fR\fIbootargs\fR); .fi .SH DESCRIPTION .sp .LP The \fBreboot()\fR function reboots the system. The \fIhowto\fR argument specifies the behavior of the system while rebooting and is a mask constructed by a bitwise-inclusive-OR of flags from the following list: .sp .ne 2 .mk .na \fB\fBRB_AUTOBOOT\fR\fR .ad .RS 15n .rt The machine is rebooted from the root filesystem on the default boot device. This is the default behavior. See \fBboot\fR(1M) and \fBkernel\fR(1M). .RE .sp .ne 2 .mk .na \fB\fBRB_HALT\fR\fR .ad .RS 15n .rt The processor is simply halted; no reboot takes place. This option should be used with caution. .RE .sp .ne 2 .mk .na \fB\fBRB_ASKNAME\fR\fR .ad .RS 15n .rt Interpreted by the bootstrap program and kernel, causing the user to be asked for pathnames during the bootstrap. .RE .sp .ne 2 .mk .na \fB\fBRB_DUMP\fR\fR .ad .RS 15n .rt The system is forced to panic immediately without any further processing and a crash dump is written to the dump device (see \fBdumpadm\fR(1M)) before rebooting. .RE .sp .LP Any other \fIhowto\fR argument causes the kernel file to boot. .sp .LP The interpretation of the \fIbootargs\fR argument is platform-dependent. .SH RETURN VALUES .sp .LP Upon successful completion, \fBreboot()\fR never returns. Otherwise, \fB\(mi1\fR is returned and \fBerrno\fR is set to indicate the error. .SH ERRORS .sp .LP The \fBreboot()\fR function will fail if: .sp .ne 2 .mk .na \fB\fBEPERM\fR\fR .ad .RS 9n .rt The {\fBPRIV_SYS_CONFIG\fR} privilege is not asserted in the effective set of the calling process. .RE .SH SEE ALSO .sp .LP \fBIntro\fR(1M), \fBboot\fR(1M), \fBdumpadm\fR(1M), \fBhalt\fR(1M), \fBinit\fR(1M), \fBkernel\fR(1M), \fBreboot\fR(1M), \fBuadmin\fR(2)