File: reboot.h

package info (click to toggle)
busybox 1:1.17.1-8+deb6u11
  • links: PTS
  • area: main
  • in suites: squeeze-lts
  • size: 15,608 kB
  • ctags: 26,465
  • sloc: ansic: 182,252; sh: 6,047; cpp: 1,428; makefile: 1,031; yacc: 570; lex: 355; perl: 309; python: 251; awk: 29
file content (31 lines) | stat: -rw-r--r-- 738 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * Definitions related to the reboot() system call,
 * shared between init.c and halt.c.
 */

#include <sys/reboot.h>

#ifndef RB_HALT_SYSTEM
# if defined(__linux__)
#  define RB_HALT_SYSTEM  0xcdef0123
#  define RB_ENABLE_CAD   0x89abcdef
#  define RB_DISABLE_CAD  0
#  define RB_POWER_OFF    0x4321fedc
#  define RB_AUTOBOOT     0x01234567
# elif defined(RB_HALT)
#  define RB_HALT_SYSTEM  RB_HALT
# endif
#endif

/* Stop system and switch power off if possible.  */
#ifndef RB_POWER_OFF
# if defined(RB_POWERDOWN)
#  define RB_POWER_OFF  RB_POWERDOWN
# elif defined(__linux__)
#  define RB_POWER_OFF  0x4321fedc
# else
#  warning "poweroff unsupported, using halt as fallback"
#  define RB_POWER_OFF  RB_HALT_SYSTEM
# endif
#endif