diff --git a/man2/reboot.2 b/man2/reboot.2 index d51a12c6d..d0c3d5953 100644 --- a/man2/reboot.2 +++ b/man2/reboot.2 @@ -22,7 +22,7 @@ .\" Modified, 27 May 2004, Michael Kerrisk .\" 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 @@ -35,7 +35,7 @@ reboot \- reboot or enable/disable Ctrl-Alt-Del .br .B #include .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 @@ -45,7 +45,7 @@ reboot \- reboot or enable/disable Ctrl-Alt-Del .br .B #include .sp -.BI "int reboot(int " flag ); +.BI "int reboot(int " cmd ); .SH DESCRIPTION The .BR reboot () @@ -78,7 +78,7 @@ are permitted as value for .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 @@ -131,7 +131,8 @@ signal to be 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 @@ -139,8 +140,16 @@ anything at present (2.1.122), but the type of reboot can be 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 @@ -150,7 +159,7 @@ Problem with getting userspace data under .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