blob: fd119c5487b779d71ef2f99925971b2f50f71a07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#ifndef SHUTDOWN_H
#define SHUTDOWN_H
#include "syscalls.h"
#define REBOOT_HALT_SYSTEM 0xcdef0123
#define REBOOT_HARD_RESET 0x01234567
#define REBOOT_ENABLE_CAD 0x89abcdef
#define REBOOT_DISABLE_CAD 0
#define REBOOT_POWEROFF 0x4321fedc
#define REBOOT_SUSPEND 0xd000fce2
#define REBOOT_NEW_KERNEL 0x45584543
static int reboot(int cmd) {
const int magic1 = 0xfee1dead;
const int magic2 = 537993216;
return syscall((void*)REBOOT, magic1, magic2, cmd, 0);
}
#endif
|