1/* 2 * Definitions related to the reboot() system call, 3 * shared between init.c and halt.c. 4 */ 5 6#include <sys/reboot.h> 7 8#ifndef RB_HALT_SYSTEM 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 17# endif 18#endif 19 20/* Stop system and switch power off if possible. */ 21#ifndef RB_POWER_OFF 22# if defined(RB_POWERDOWN) 23# define RB_POWER_OFF RB_POWERDOWN 24# elif defined(__linux__) 25# define RB_POWER_OFF 0x4321fedc 26# else 27# warning "poweroff unsupported, using halt as fallback" 28# define RB_POWER_OFF RB_HALT_SYSTEM 29# endif 30#endif 31