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]> > --- > libmultipath/uevent.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libmultipath/uevent.c b/libmultipath/uevent.c > index d3061bf..4265904 100644 > --- a/libmultipath/uevent.c > +++ b/libmultipath/uevent.c > @@ -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); > -- > 2.32.0
-- dm-devel mailing list [email protected] https://listman.redhat.com/mailman/listinfo/dm-devel
