Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | --- a/kexec/kexec-syscall.h |
| 2 | +++ b/kexec/kexec-syscall.h |
| 3 | @@ -2,7 +2,7 @@ |
| 4 | #define KEXEC_SYSCALL_H |
| 5 | |
| 6 | #define __LIBRARY__ |
| 7 | -#include <syscall.h> |
| 8 | +/*#include <syscall.h>*/ |
| 9 | #include <sys/syscall.h> |
| 10 | #include <unistd.h> |
| 11 | |
| 12 | @@ -23,6 +23,7 @@ |
| 13 | #define LINUX_REBOOT_CMD_KEXEC 0x45584543 |
| 14 | |
| 15 | #ifndef __NR_kexec_load |
| 16 | +/* |
| 17 | #ifdef __i386__ |
| 18 | #define __NR_kexec_load 283 |
| 19 | #endif |
| 20 | @@ -61,19 +62,21 @@ |
| 21 | #ifndef __NR_kexec_load |
| 22 | #error Unknown processor architecture. Needs a kexec_load syscall number. |
| 23 | #endif |
| 24 | +*/ |
| 25 | #endif /*ifndef __NR_kexec_load*/ |
| 26 | |
| 27 | struct kexec_segment; |
| 28 | - |
| 29 | +/* |
| 30 | static inline long kexec_load(void *entry, unsigned long nr_segments, |
| 31 | struct kexec_segment *segments, unsigned long flags) |
| 32 | { |
| 33 | return (long) syscall(__NR_kexec_load, entry, nr_segments, segments, flags); |
| 34 | } |
| 35 | - |
| 36 | +*/ |
| 37 | static inline long kexec_reboot(void) |
| 38 | { |
| 39 | - return (long) syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_KEXEC, 0); |
| 40 | + //return (long) syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_KEXEC, 0); |
| 41 | + return __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_KEXEC, 0); |
| 42 | } |
| 43 | |
| 44 | |