diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-09-08 23:46:54 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-09-08 23:46:54 +0200 |
commit | e77f52e5f951e6b51f3b6eeee69f1f8bb965f4f3 (patch) | |
tree | 5748f1c55bdb1015bf32d7d3284ace57f74de8b8 /src/udev | |
parent | network: increase receive buffer size for device monitor (diff) | |
download | systemd-e77f52e5f951e6b51f3b6eeee69f1f8bb965f4f3.tar.xz systemd-e77f52e5f951e6b51f3b6eeee69f1f8bb965f4f3.zip |
udev: warn if failed to set buffer size for device monitor
Diffstat (limited to 'src/udev')
-rw-r--r-- | src/udev/udevd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 48a7774fc9..22dad2acaf 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -1686,8 +1686,11 @@ static int manager_new(Manager **ret, int fd_ctrl, int fd_uevent, const char *cg /* Bump receiver buffer, but only if we are not called via socket activation, as in that * case systemd sets the receive buffer size for us, and the value in the .socket unit * should take full effect. */ - if (fd_uevent < 0) - (void) sd_device_monitor_set_receive_buffer_size(manager->monitor, 128 * 1024 * 1024); + if (fd_uevent < 0) { + r = sd_device_monitor_set_receive_buffer_size(manager->monitor, 128 * 1024 * 1024); + if (r < 0) + log_warning_errno(r, "Failed to set receive buffer size for device monitor, ignoring: %m"); + } r = device_monitor_enable_receiving(manager->monitor); if (r < 0) |