summaryrefslogtreecommitdiffstats
path: root/fix_missed_uevs.patch
blob: c614aa2009c7573d2261808595f0b0e178c44cab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Index: multipath-tools-090724/libmultipath/uevent.c
===================================================================
--- multipath-tools-090724.orig/libmultipath/uevent.c
+++ multipath-tools-090724/libmultipath/uevent.c
@@ -231,7 +231,8 @@ int uevent_listen(int (*uev_trigger)(str
 		smsg.msg_control = cred_msg;
 		smsg.msg_controllen = sizeof(cred_msg);
 
-		if (recvmsg(sock, &smsg, 0) < 0) {
+		buflen = recvmsg(sock, &smsg, 0);
+		if (buflen < 0) {
 			if (errno != EINTR)
 				condlog(0, "error receiving message");
 			continue;
@@ -286,8 +287,10 @@ int uevent_listen(int (*uev_trigger)(str
 		/* action string */
 		uev->action = buffer;
 		pos = strchr(buffer, '@');
-		if (!pos)
+		if (!pos) {
+			condlog(3, "bad action string '%s'", buffer);
 			continue;
+		}
 		pos[0] = '\0';
 
 		/* sysfs path */