diff options
author | Saul Wold <sgw@linux.intel.com> | 2014-11-06 16:19:44 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-11-09 10:21:22 +0000 |
commit | c58237560dcb20283b27a816ffbafa0818ffc98e (patch) | |
tree | 9568ac202bc1a797652a3c6d9ce805c2ca59be50 /meta/recipes-extended | |
parent | f5ecb7548163ed80bb0c55f32cee3644ac8a0531 (diff) | |
download | poky-c58237560dcb20283b27a816ffbafa0818ffc98e.tar.gz |
watchdog: Upgrade to 5.14
Move the patches from generic files to watchdog
Rebased the fix-ping due to code reorg on the source
(From OE-Core rev: fb2e1fd7d2df68d02f5da7dbf4390ea03e7eafdb)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r-- | meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch (renamed from meta/recipes-extended/watchdog/files/fix-ping-failure.patch) | 56 | ||||
-rw-r--r-- | meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch (renamed from meta/recipes-extended/watchdog/files/fixsepbuild.patch) | 0 | ||||
-rw-r--r-- | meta/recipes-extended/watchdog/watchdog_5.14.bb (renamed from meta/recipes-extended/watchdog/watchdog_5.13.bb) | 5 |
3 files changed, 38 insertions, 23 deletions
diff --git a/meta/recipes-extended/watchdog/files/fix-ping-failure.patch b/meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch index f5976eb5cf..14ab9c56ab 100644 --- a/meta/recipes-extended/watchdog/files/fix-ping-failure.patch +++ b/meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch | |||
@@ -33,11 +33,11 @@ Signed-off-by: Roy.Li <rongqing.li@windriver.com> | |||
33 | src/watchdog.c | 5 ++++- | 33 | src/watchdog.c | 5 ++++- |
34 | 2 files changed, 5 insertions(+), 2 deletions(-) | 34 | 2 files changed, 5 insertions(+), 2 deletions(-) |
35 | 35 | ||
36 | Index: watchdog-5.13/src/watchdog.c | 36 | Index: watchdog-5.14/src/watchdog.c |
37 | =================================================================== | 37 | =================================================================== |
38 | --- watchdog-5.13.orig/src/watchdog.c 2013-02-01 03:15:44.000000000 -0800 | 38 | --- watchdog-5.14.orig/src/watchdog.c |
39 | +++ watchdog-5.13/src/watchdog.c 2013-03-11 22:27:48.741657881 -0700 | 39 | +++ watchdog-5.14/src/watchdog.c |
40 | @@ -28,6 +28,7 @@ | 40 | @@ -24,6 +24,7 @@ |
41 | #include <sys/types.h> | 41 | #include <sys/types.h> |
42 | #include <sys/ioctl.h> | 42 | #include <sys/ioctl.h> |
43 | #include <linux/oom.h> | 43 | #include <linux/oom.h> |
@@ -45,21 +45,35 @@ Index: watchdog-5.13/src/watchdog.c | |||
45 | #include <linux/watchdog.h> | 45 | #include <linux/watchdog.h> |
46 | #include <string.h> | 46 | #include <string.h> |
47 | 47 | ||
48 | @@ -567,6 +568,8 @@ | 48 | Index: watchdog-5.14/src/net.c |
49 | pid_t child_pid; | 49 | =================================================================== |
50 | int oom_adjusted = 0; | 50 | --- watchdog-5.14.orig/src/net.c |
51 | struct stat s; | 51 | +++ watchdog-5.14/src/net.c |
52 | + struct icmp_filter filt; | 52 | @@ -11,7 +11,8 @@ |
53 | + filt.data = ~(1<<ICMP_ECHOREPLY); | 53 | #include <errno.h> |
54 | #include <sys/time.h> | ||
55 | #include <netinet/ip.h> | ||
56 | -#include <netinet/ip_icmp.h> | ||
57 | +#include <linux/icmp.h> | ||
58 | +//#include <netinet/ip_icmp.h> | ||
59 | #include <fcntl.h> | ||
60 | #include <string.h> | ||
61 | #include <unistd.h> /* for gethostname() etc */ | ||
62 | @@ -179,6 +180,9 @@ int open_netcheck(struct list *tlist) | ||
63 | { | ||
64 | struct list *act; | ||
65 | int hold = 0; | ||
66 | + struct icmp_filter filt; | ||
67 | + filt.data = ~(1<<ICMP_ECHOREPLY); | ||
68 | + | ||
69 | |||
70 | if (tlist != NULL) { | ||
71 | for (act = tlist; act != NULL; act = act->next) { | ||
72 | @@ -202,6 +206,7 @@ int open_netcheck(struct list *tlist) | ||
73 | fatal_error(EX_SYSERR, "error opening socket (%s)", strerror(errno)); | ||
74 | } | ||
75 | |||
76 | + setsockopt(net->sock_fp, SOL_RAW, ICMP_FILTER, (char*)&filt, sizeof(filt)); | ||
77 | /* this is necessary for broadcast pings to work */ | ||
78 | (void)setsockopt(net->sock_fp, SOL_SOCKET, SO_BROADCAST, (char *)&hold, sizeof(hold)); | ||
54 | 79 | ||
55 | #if USE_SYSLOG | ||
56 | char *opts = "d:i:n:Ffsvbql:p:t:c:r:m:a:"; | ||
57 | @@ -703,7 +706,7 @@ | ||
58 | perror(progname); | ||
59 | exit(1); | ||
60 | } | ||
61 | - | ||
62 | + setsockopt(net->sock_fp, SOL_RAW, ICMP_FILTER, (char*)&filt, sizeof(filt)); | ||
63 | /* this is necessary for broadcast pings to work */ | ||
64 | (void) setsockopt(net->sock_fp, SOL_SOCKET, SO_BROADCAST, (char *)&hold, sizeof(hold)); | ||
65 | |||
diff --git a/meta/recipes-extended/watchdog/files/fixsepbuild.patch b/meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch index 2fad3a112f..2fad3a112f 100644 --- a/meta/recipes-extended/watchdog/files/fixsepbuild.patch +++ b/meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch | |||
diff --git a/meta/recipes-extended/watchdog/watchdog_5.13.bb b/meta/recipes-extended/watchdog/watchdog_5.14.bb index b9e29d22fc..c77d91dcdd 100644 --- a/meta/recipes-extended/watchdog/watchdog_5.13.bb +++ b/meta/recipes-extended/watchdog/watchdog_5.14.bb | |||
@@ -11,8 +11,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ecc0551bf54ad97f6b541720f84d6569" | |||
11 | SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \ | 11 | SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \ |
12 | file://fixsepbuild.patch \ | 12 | file://fixsepbuild.patch \ |
13 | file://fix-ping-failure.patch" | 13 | file://fix-ping-failure.patch" |
14 | SRC_URI[md5sum] = "153455f008f1cf8f65f6ad9586a21ff1" | 14 | |
15 | SRC_URI[sha256sum] = "141e0faf3ee4d8187a6ff4e00b18ef7b7a4ce432a2d4c8a6e6fdc62507fc6eb0" | 15 | SRC_URI[md5sum] = "5b2dba0c593942f4acc100bca0d560c4" |
16 | SRC_URI[sha256sum] = "620b2f49e9879f2e85c73d4c1f422f9101e6b38e824fea2414befd8bb6866ad1" | ||
16 | 17 | ||
17 | inherit autotools | 18 | inherit autotools |
18 | 19 | ||