]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: warn if failed to set buffer size for device monitor 16982/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 8 Sep 2020 21:46:54 +0000 (06:46 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 8 Sep 2020 21:46:54 +0000 (06:46 +0900)
src/udev/udevd.c

index 48a7774fc9be81a26dc7491381e13cecf096a86e..22dad2acafa0969047338e3fe0b7ddaefd379255 100644 (file)
@@ -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)