| Line | |
|---|
| 1 | .TH REBOOT 2
|
|---|
| 2 | .SH NAME
|
|---|
| 3 | reboot \- close down the system or reboot
|
|---|
| 4 | .SH SYNTAX
|
|---|
| 5 | .ft B
|
|---|
| 6 | .nf
|
|---|
| 7 | #define _MINIX_SOURCE 1
|
|---|
| 8 |
|
|---|
| 9 | #include <unistd.h>
|
|---|
| 10 |
|
|---|
| 11 | int reboot(int \fIhow\fP, ...)
|
|---|
| 12 | .fi
|
|---|
| 13 | .ft P
|
|---|
| 14 | .SH DESCRIPTION
|
|---|
| 15 | .B Reboot()
|
|---|
| 16 | is used to close down the system. It allows several ways of shutting
|
|---|
| 17 | down depending on
|
|---|
| 18 | .IR how :
|
|---|
| 19 | .PP
|
|---|
| 20 | .TP 5
|
|---|
| 21 | .BI "reboot(RBT_HALT)"
|
|---|
| 22 | Halt the system and return to the monitor prompt.
|
|---|
| 23 | .TP
|
|---|
| 24 | .BI "reboot(RBT_REBOOT)"
|
|---|
| 25 | Reboot the system by letting the monitor execute the "boot" command.
|
|---|
| 26 | .TP
|
|---|
| 27 | .BI "reboot(RBT_PANIC)"
|
|---|
| 28 | Cause a system panic. This is not normally done from user mode, but by
|
|---|
| 29 | servers using the
|
|---|
| 30 | .B sys_abort()
|
|---|
| 31 | kernel call.
|
|---|
| 32 | .TP
|
|---|
| 33 | .BI "reboot(RBT_MONITOR" ", code, length" ")"
|
|---|
| 34 | Halt the system and let the monitor execute the given code of the given
|
|---|
| 35 | length.
|
|---|
| 36 | .RI ( code
|
|---|
| 37 | is of type
|
|---|
| 38 | .B "char *"
|
|---|
| 39 | and
|
|---|
| 40 | .I length
|
|---|
| 41 | of type
|
|---|
| 42 | .BR size_t .)
|
|---|
| 43 | .TP
|
|---|
| 44 | .BI "reboot(RBT_RESET)"
|
|---|
| 45 | Reboot the system with a hardware reset.
|
|---|
| 46 | .PP
|
|---|
| 47 | .B Reboot()
|
|---|
| 48 | may only be executed by the super-user.
|
|---|
| 49 | .SH DIAGNOSTICS
|
|---|
| 50 | If the call succeeds, it never returns. If something went wrong,
|
|---|
| 51 | the return value is -1 and an error is indicated by
|
|---|
| 52 | .BR errno .
|
|---|
| 53 | .SH SEE ALSO
|
|---|
| 54 | .BR shutdown (8),
|
|---|
| 55 | .BR reboot (8),
|
|---|
| 56 | .BR halt (8),
|
|---|
| 57 | .BR sync (2).
|
|---|
| 58 | .SH NOTES
|
|---|
| 59 | MINIX 3 can not return to the monitor if running in real mode. This means
|
|---|
| 60 | that most of the reboot functions will change to a system reset.
|
|---|
| 61 | .SH AUTHOR
|
|---|
| 62 | Edvard Tuinder (v892231@si.hhs.NL)
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.