.\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added notes on capability requirements
.\"
-.TH REBOOT 2 2004-05-27 "Linux" "Linux Programmer's Manual"
+.TH REBOOT 2 2007-02-11 "Linux" "Linux Programmer's Manual"
.SH NAME
reboot \- reboot or enable/disable Ctrl-Alt-Del
.SH SYNOPSIS
.br
.B #include <linux/reboot.h>
.sp
-.BI "int reboot(int " magic ", int " magic2 ", int " flag ", void *" arg );
+.BI "int reboot(int " magic ", int " magic2 ", int " cmd ", void *" arg );
.sp
/* Under glibc some of the constants involved have gotten
symbolic names RB_*, and the library call is a 1-argument
.br
.B #include <sys/reboot.h>
.sp
-.BI "int reboot(int " flag );
+.BI "int reboot(int " cmd );
.SH DESCRIPTION
The
.BR reboot ()
.IR magic2 .
(The hexadecimal values of these constants are meaningful.)
The
-.I flag
+.I cmd
argument can have the following values:
.TP
.B LINUX_REBOOT_CMD_RESTART
sent to init (process 1), whereupon this process may decide upon a
proper action (maybe: kill all processes, sync, reboot).
.LP
-Only the superuser may use this function.
+Only the superuser may call
+.BR reboot ().
.LP
The precise effect of the above actions depends on the architecture.
For the i386 architecture, the additional argument does not do
determined by kernel command line arguments (`reboot=...') to be
either warm or cold, and either hard or through the BIOS.
.SH "RETURN VALUE"
-On success, zero is returned.
-On error, \-1 is returned, and
+For the values of
+.I cmd
+that stop or restart the system,
+a successful call to
+.BR reboot ()
+does not return.
+For the other
+.I cmd
+values, zero is returned on success.
+In all cases, \-1 is returned on failure, and
.I errno
is set appropriately.
.SH ERRORS
.BR LINUX_REBOOT_CMD_RESTART2 .
.TP
.B EINVAL
-Bad magic numbers or \fIflag\fP.
+Bad magic numbers or \fIcmd\fP.
.TP
.B EPERM
The calling process has insufficient privilege to call