diff options
author | Andrea Adami <andrea.adami@gmail.com> | 2012-02-21 00:21:54 +0000 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2012-02-22 09:40:25 +0100 |
commit | 302cf2272c362612cabdc27001475f1c91f06608 (patch) | |
tree | c1d8f83465b8b1ac49c425e3b79663c6d8d92b46 /meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc-2.0.2/syscall.patch | |
parent | 25c2e973e02ecc2a0aff4ccea8c53c42519ff5e3 (diff) | |
download | meta-openembedded-302cf2272c362612cabdc27001475f1c91f06608.tar.gz |
meta-initramfs: add kexec-tools-klibc from meta-oe
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc-2.0.2/syscall.patch')
-rw-r--r-- | meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc-2.0.2/syscall.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc-2.0.2/syscall.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc-2.0.2/syscall.patch new file mode 100644 index 0000000000..ae2e3f6a66 --- /dev/null +++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc-2.0.2/syscall.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | Index: kexec-tools-2.0.2/kexec/kexec-syscall.h | ||
2 | =================================================================== | ||
3 | --- kexec-tools-2.0.2.orig/kexec/kexec-syscall.h 2010-07-29 06:19:59.000000000 +0200 | ||
4 | +++ kexec-tools-2.0.2/kexec/kexec-syscall.h 2010-08-02 00:13:39.000000000 +0200 | ||
5 | @@ -2,7 +2,7 @@ | ||
6 | #define KEXEC_SYSCALL_H | ||
7 | |||
8 | #define __LIBRARY__ | ||
9 | -#include <syscall.h> | ||
10 | +/*#include <syscall.h>*/ | ||
11 | #include <sys/syscall.h> | ||
12 | #include <unistd.h> | ||
13 | |||
14 | @@ -23,6 +23,7 @@ | ||
15 | #define LINUX_REBOOT_CMD_KEXEC 0x45584543 | ||
16 | |||
17 | #ifndef __NR_kexec_load | ||
18 | +/* | ||
19 | #ifdef __i386__ | ||
20 | #define __NR_kexec_load 283 | ||
21 | #endif | ||
22 | @@ -61,19 +62,21 @@ | ||
23 | #ifndef __NR_kexec_load | ||
24 | #error Unknown processor architecture. Needs a kexec_load syscall number. | ||
25 | #endif | ||
26 | +*/ | ||
27 | #endif /*ifndef __NR_kexec_load*/ | ||
28 | |||
29 | struct kexec_segment; | ||
30 | - | ||
31 | +/* | ||
32 | static inline long kexec_load(void *entry, unsigned long nr_segments, | ||
33 | struct kexec_segment *segments, unsigned long flags) | ||
34 | { | ||
35 | return (long) syscall(__NR_kexec_load, entry, nr_segments, segments, flags); | ||
36 | } | ||
37 | - | ||
38 | +*/ | ||
39 | static inline long kexec_reboot(void) | ||
40 | { | ||
41 | - return (long) syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_KEXEC, 0); | ||
42 | + //return (long) syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_KEXEC, 0); | ||
43 | + return __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_KEXEC, 0); | ||
44 | } | ||
45 | |||
46 | |||