The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
reboot.h
Go to the documentation of this file.
1#pragma once
2
3/**
4 * @file reboot.h
5 * @brief restart or turn off the machine (root only), as on Linux.
6 */
7
8#define RB_AUTOBOOT 0x01234567 // restart
9#define RB_POWER_OFF 0x4321FEDC // turn the machine off
10
11/**
12 * restart or turn off the machine.
13 * @param how RB_AUTOBOOT or RB_POWER_OFF.
14 * @return does not return on success; -1 with errno EPERM for other users,
15 * EINVAL for another value.
16 */
17int reboot(int how);
int reboot(int how)
restart or turn off the machine.