libmultipath: avoid buffer size warning with systemd 240+
PATCH 1/1 libmultipath: avoid buffer size warning with systemd 240+
From: Martin Wilck <[email protected]>
Since systemd commit e39b4d2 ("libudev: re-implement udev-monitor by sd_device_monitor"), udev_monitor_set_receive_buffer_size() returns 1 on success. Fix the test for the return value to avoid a misleading "failed to increase buffer size" warning.
Signed-off-by Martin Wilck <[email protected]>
--- libmultipath/uevent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
libmultipath/uevent.c +1 -1
@@ -569,7 +569,7 @@ int uevent_listen(struct udev *udev) }pthread_cleanup_push (monitor_cleanup, monitor);#ifdef LIBUDEV_API_RECVBUF -if (udev_monitor_set_receive_buffer_size (monitor,128 *1024 *1024 )) +if (udev_monitor_set_receive_buffer_size (monitor,128 *1024 *1024 ) <0 )condlog (2 ,"failed to increase buffer size" );#endif fd =udev_monitor_get_fd (monitor);
Signature · 7 lines
2.32.0 -- dm-devel mailing list [email protected] https://listman.redhat.com/mailman/listinfo/dm-devel
Quoted 8 lines · On Thu, Aug 12, 2021 at 12:45:15PM +0200, [email protected] wrote:
From: Martin Wilck <[email protected]>
Since systemd commit e39b4d2 ("libudev: re-implement udev-monitor by
sd_device_monitor"),udev_monitor_set_receive_buffer_size()returns 1 on success. Fix the test for the return value to avoid a misleading "failed to increase buffer size" warning.Signed-off-by Martin Wilck <[email protected]>
Reviewed-by Benjamin Marzinski <[email protected]>
Quoted 19 lines
--- libmultipath/uevent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)libmultipath/uevent.c +1
-1@@ -569,7 +569,7 @@ int uevent_listen(struct udev *udev) }pthread_cleanup_push (monitor_cleanup, monitor);#ifdef LIBUDEV_API_RECVBUF -if (udev_monitor_set_receive_buffer_size (monitor,128 *1024 *1024 )) +if (udev_monitor_set_receive_buffer_size (monitor,128 *1024 *1024 ) <0 )condlog (2 ,"failed to increase buffer size" );#endif fd =udev_monitor_get_fd (monitor);Signature · 1 line
2.32.0
--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel