reboot(3) — LIBRARY FUNCTIONS
NAME
reboot − reboot system or halt processor
SYNOPSIS
/usr/ucb/cc [ flag. . . ] file . . .
#include <sys/reboot.h>
reboot(howto, [ bootargs ] )
int howto;
char ∗bootargs;
DESCRIPTION
reboot reboots the system, and is invoked automatically in the event of unrecoverable system failures. howto is a mask of options passed to the bootstrap program. The system call interface permits only RB_HALT or RB_AUTOBOOT to be passed to the reboot program; the other flags are used in scripts stored on the console storage media, or used in manual bootstrap procedures. When none of these options (for instance RB_AUTOBOOT) is given, the system is rebooted from file /stand/unix. An automatic consistency check of the disks is then normally performed.
The only bit of howto that are used are:
RB_HALT the processor is simply halted; no reboot takes place. RB_HALT should be used with caution.
RB_ASKNAME Interpreted by the bootstrap program itself, causing it to inquire as to what file should be booted. On Motorola platforms this bit has no effect.
RETURN VALUE
If successful, this call never returns. Otherwise, a −1 is returned and an error is returned in the global variable errno.
ERRORS
EPERM The caller is not the super-user.
FILES
/vmunix
SEE ALSO
halt(1M) init(1M) reboot(1M) uadmin(2)
NOTES
On Motorola platforms, the reboot is accomplished by performing a system reset and cold start. The configuration of the firmware monitor (bug) determines whether the bug will prompt for commands or automatically reboot. If the hardware (e.g., the MVME181) is incapable of performing a reboot, the effect is the same as RB_HALT.
Only the super-user may reboot a machine.
— BSD Compatibility Package