Reboots the system, or enables/disables the reboot keystroke.
- Parameters
-
magic1 | fails (with the error EINVAL) unless equals LINUX_REBOOT_MAGIC1. |
magic2 | fails (with the error EINVAL) unless equals LINUX_REBOOT_MAGIC2. |
cmd | The command to send to the reboot. |
arg | Argument passed with some specific commands. |
- Returns
- For the values of cmd that stop or restart the system, a successful call to reboot() does not return. For the other cmd values, zero is returned on success. In all cases, -1 is returned on failure, and errno is set appropriately.