reboot.h (1382B)
1 #ifndef ARUU_REBOOT_H 2 #define ARUU_REBOOT_H 3 4 enum { 5 REBOOT_HALT, 6 REBOOT_POWEROFF, 7 REBOOT_RESTART, 8 }; 9 10 /* a backend per kernel: stop or restart the machine */ 11 int machine_reboot(int how); 12 13 /* 14 * magic values required to use _reboot() system call 15 */ 16 17 #define LINUX_REBOOT_MAGIC1 0xfee1dead 18 #define LINUX_REBOOT_MAGIC2 672274793 19 #define LINUX_REBOOT_MAGIC2A 85072278 20 #define LINUX_REBOOT_MAGIC2B 369367448 21 #define LINUX_REBOOT_MAGIC2C 537993216 22 23 /* 24 * commands accepted by the _reboot() system call 25 * 26 * RESTART restart system using default command and mode 27 * HALT stop OS and give system control to ROM monitor, if any 28 * CAD_ON ctrl-alt-del sequence causes RESTART command 29 * CAD_OFF ctrl-alt-del sequence sends SIGINT to init task 30 * POWER_OFF stop OS and remove all power from system, if possible 31 * RESTART2 restart system using given command string 32 * SW_SUSPEND suspend system using software suspend if compiled in 33 * KEXEC restart system using a previously loaded linux kernel 34 */ 35 36 #define LINUX_REBOOT_CMD_RESTART 0x01234567 37 #define LINUX_REBOOT_CMD_HALT 0xCDEF0123 38 #define LINUX_REBOOT_CMD_CAD_ON 0x89ABCDEF 39 #define LINUX_REBOOT_CMD_CAD_OFF 0x00000000 40 #define LINUX_REBOOT_CMD_POWER_OFF 0x4321FEDC 41 #define LINUX_REBOOT_CMD_RESTART2 0xA1B2C3D4 42 #define LINUX_REBOOT_CMD_SW_SUSPEND 0xD000FCE2 43 #define LINUX_REBOOT_CMD_KEXEC 0x45584543 44 45 #endif