2 * Definitions related to the reboot() system call,
3 * shared between init.c and halt.c.
6 #include <sys/reboot.h>
9 # if defined(__linux__)
10 # define RB_HALT_SYSTEM 0xcdef0123
11 # define RB_ENABLE_CAD 0x89abcdef
12 # define RB_DISABLE_CAD 0
13 # define RB_POWER_OFF 0x4321fedc
14 # define RB_AUTOBOOT 0x01234567
15 # elif defined(RB_HALT)
16 # define RB_HALT_SYSTEM RB_HALT
20 /* Stop system and switch power off if possible. */
22 # if defined(RB_POWERDOWN)
23 # define RB_POWER_OFF RB_POWERDOWN
24 # elif defined(__linux__)
25 # define RB_POWER_OFF 0x4321fedc
27 # warning "poweroff unsupported, using halt as fallback"
28 # define RB_POWER_OFF RB_HALT_SYSTEM