All rights reserved.
Redistribution and use in source and binary forms are permitted
provided that the above copyright notice and this paragraph are
duplicated in all such forms and that any documentation,
advertising materials, and other materials related to such
distribution and use acknowledge that the software was developed
by the University of California, Berkeley. The name of the
University may not be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@(#)reboot.2 6.2 (Berkeley) 05/18/89
#include <sys/reboot.h>reboot(howto) int howto;
The bits of howto 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. Normally, the system is booted from the file \*(lqxx(0,0)vmunix\*(rq without asking.
RB_SINGLE Normally, the reboot procedure involves an automatic disk consistency check and then multi-user operations. RB_SINGLE prevents the consistency check, rather simply booting the system with a single-user shell on the console. RB_SINGLE is interpreted by the init (8) program in the newly booted system. This switch is not available from the system call interface.
Only the super-user may reboot a machine.
15 [EPERM] The caller is not the super-user.