#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_RESTART 0x4321fedc #define REBOOT_SUSPEND 0xd000fce2 #define REBOOT_NEW_KERNEL 0x45584543 #define REBOOT_POWEROFF 0x01234567 static int reboot(int cmd) { const int magic1 = 0xfee1dead; const int magic2 = 537993216; return syscall((void*)REBOOT, magic1, magic2, cmd, 0); } #endif