summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/multipath-tools
diff options
context:
space:
mode:
authorJoe Slater <joe.slater@windriver.com>2020-12-18 13:43:50 +0800
committerKhem Raj <raj.khem@gmail.com>2020-12-18 08:23:14 -0800
commit60a95ba16ec29d9cb8be32436bb0f96b2a5106aa (patch)
tree07ac9dac7579e04ffae68c78b718cdf699c3fbfa /meta-oe/recipes-support/multipath-tools
parent47286a92d4410cdd7bd5dbce6dd31447f594538e (diff)
downloadmeta-openembedded-60a95ba16ec29d9cb8be32436bb0f96b2a5106aa.tar.gz
multipath-tools: fix error handling for udev_monitor_set_receive_buffer_size
Since systemd v246.5[1], udev_monitor_set_receive_buffer_size() will return 0 or 1 if successful. We only need to check a negative value for the failure. [1] https://github.com/systemd/systemd-stable/commit/4dcae666889ae9469e4406c0bcaffadbc01c4f66 https://github.com/systemd/systemd-stable/commit/fe9b92e566f837665cc06c82374e4e42f9295c99 https://github.com/systemd/systemd-stable/commit/5dd4cc4b10daea5d2ba969425ba02d2098dd06a4 Signed-off-by: Joe Slater <joe.slater@windriver.com> Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/multipath-tools')
-rw-r--r--meta-oe/recipes-support/multipath-tools/files/0001-libmultipath-uevent.c-fix-error-handling-for-udev_mo.patch39
-rw-r--r--meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.4.bb1
2 files changed, 40 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/multipath-tools/files/0001-libmultipath-uevent.c-fix-error-handling-for-udev_mo.patch b/meta-oe/recipes-support/multipath-tools/files/0001-libmultipath-uevent.c-fix-error-handling-for-udev_mo.patch
new file mode 100644
index 000000000..d261b13d9
--- /dev/null
+++ b/meta-oe/recipes-support/multipath-tools/files/0001-libmultipath-uevent.c-fix-error-handling-for-udev_mo.patch
@@ -0,0 +1,39 @@
1From 8579d8a35886f91974e0ac4dbdf2edb7dac06d52 Mon Sep 17 00:00:00 2001
2From: Joe Slater <joe.slater@windriver.com>
3Date: Fri, 18 Dec 2020 11:17:50 +0800
4Subject: [PATCH] libmultipath/uevent.c: fix error handling for
5 udev_monitor_set_receive_buffer_size
6
7Since systemd v246.5[1], udev_monitor_set_receive_buffer_size() will
8return 0 or 1 if successful. We only need to check a negative value for
9the failure.
10
11[1] https://github.com/systemd/systemd-stable/commit/4dcae666889ae9469e4406c0bcaffadbc01c4f66
12 https://github.com/systemd/systemd-stable/commit/fe9b92e566f837665cc06c82374e4e42f9295c99
13 https://github.com/systemd/systemd-stable/commit/5dd4cc4b10daea5d2ba969425ba02d2098dd06a4
14
15Upstream-Status: Pending
16
17Signed-off-by: Joe Slater <joe.slater@windriver.com>
18Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
19---
20 libmultipath/uevent.c | 3 ++-
21 1 file changed, 2 insertions(+), 1 deletion(-)
22
23diff --git a/libmultipath/uevent.c b/libmultipath/uevent.c
24index d38e8a7f..4b298052 100644
25--- a/libmultipath/uevent.c
26+++ b/libmultipath/uevent.c
27@@ -810,7 +810,8 @@ int uevent_listen(struct udev *udev)
28 }
29 pthread_cleanup_push(monitor_cleanup, monitor);
30 #ifdef LIBUDEV_API_RECVBUF
31- if (udev_monitor_set_receive_buffer_size(monitor, 128 * 1024 * 1024))
32+ err = udev_monitor_set_receive_buffer_size(monitor, 128 * 1024 * 1024);
33+ if (err < 0)
34 condlog(2, "failed to increase buffer size");
35 #endif
36 fd = udev_monitor_get_fd(monitor);
37--
382.17.1
39
diff --git a/meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.4.bb b/meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.4.bb
index 331c0cd01..186f78b8f 100644
--- a/meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.4.bb
+++ b/meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.4.bb
@@ -47,6 +47,7 @@ SRC_URI = "git://git.opensvc.com/multipath-tools/.git;protocol=http \
47 file://0001-fix-bug-of-do_compile-and-do_install.patch \ 47 file://0001-fix-bug-of-do_compile-and-do_install.patch \
48 file://0001-add-explicit-dependency-on-libraries.patch \ 48 file://0001-add-explicit-dependency-on-libraries.patch \
49 file://0001-fix-boolean-value-with-json-c-0.14.patch \ 49 file://0001-fix-boolean-value-with-json-c-0.14.patch \
50 file://0001-libmultipath-uevent.c-fix-error-handling-for-udev_mo.patch \
50 " 51 "
51 52
52LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" 53LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"