Re: [PATCH] libmultipath: avoid buffer size warning with systemd 240+

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 12, 2021 at 12:45:15PM +0200, mwilck@xxxxxxxx wrote:
> From: Martin Wilck <mwilck@xxxxxxxx>
> 
> 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 <mwilck@xxxxxxxx>
Reviewed-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx>
> ---
>  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
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux