summaryrefslogtreecommitdiff
path: root/kexec/kexec-syscall.h
diff options
context:
space:
mode:
authormaximilian attems <max@stro.at>2012-05-22 18:59:47 +0200
committerSimon Horman <horms@verge.net.au>2012-07-13 15:33:52 +0900
commit583c81c1c5e52520d18efc612c5e6894f4a4ed10 (patch)
tree9c5bcc731efcc1ca8a1fd5c3799b2d9a935eb3c7 /kexec/kexec-syscall.h
parentf429692c74c7ebd674b9d378326aab1b5d0225ed (diff)
kexec: simply pass LINUX_REBOOT_CMD_KEXEC to reboot
While trying to port kexec cleanly to klibc, came across this syscall usage for reboot(2). Calling reboot directly simplifies the code. Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/kexec-syscall.h')
-rw-r--r--kexec/kexec-syscall.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
index f4df45c..b56cb00 100644
--- a/kexec/kexec-syscall.h
+++ b/kexec/kexec-syscall.h
@@ -5,18 +5,6 @@
#include <sys/syscall.h>
#include <unistd.h>
-#define LINUX_REBOOT_MAGIC1 0xfee1dead
-#define LINUX_REBOOT_MAGIC2 672274793
-#define LINUX_REBOOT_MAGIC2A 85072278
-#define LINUX_REBOOT_MAGIC2B 369367448
-
-#define LINUX_REBOOT_CMD_RESTART 0x01234567
-#define LINUX_REBOOT_CMD_HALT 0xCDEF0123
-#define LINUX_REBOOT_CMD_CAD_ON 0x89ABCDEF
-#define LINUX_REBOOT_CMD_CAD_OFF 0x00000000
-#define LINUX_REBOOT_CMD_POWER_OFF 0x4321FEDC
-#define LINUX_REBOOT_CMD_RESTART2 0xA1B2C3D4
-#define LINUX_REBOOT_CMD_EXEC_KERNEL 0x18273645
#define LINUX_REBOOT_CMD_KEXEC_OLD 0x81726354
#define LINUX_REBOOT_CMD_KEXEC_OLD2 0x18263645
#define LINUX_REBOOT_CMD_KEXEC 0x45584543
@@ -70,12 +58,6 @@ static inline long kexec_load(void *entry, unsigned long nr_segments,
return (long) syscall(__NR_kexec_load, entry, nr_segments, segments, flags);
}
-static inline long kexec_reboot(void)
-{
- return (long) syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_KEXEC, 0);
-}
-
-
#define KEXEC_ON_CRASH 0x00000001
#define KEXEC_PRESERVE_CONTEXT 0x00000002
#define KEXEC_ARCH_MASK 0xffff0000