reboot.h 737 B

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