chiark / gitweb /
udevadm monitor: increase netlink buffer size
authorScott James Remnant <scott@ubuntu.com>
Wed, 17 Feb 2010 15:27:36 +0000 (15:27 +0000)
committerScott James Remnant <scott@ubuntu.com>
Wed, 17 Feb 2010 15:27:36 +0000 (15:27 +0000)
A common use (e.g. in Ubuntu) for udevadm monitor is to log the events
received by udev during boot; events can be lost of the buffer size isn't
increased as udevd does.

Signed-off-by: Scott James Remnant <scott@ubuntu.com>
udev/udevadm-monitor.c

index 00b130d..ea4b7dc 100644 (file)
@@ -158,6 +158,7 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[])
                        rc = 1;
                        goto out;
                }
+               udev_monitor_set_receive_buffer_size(udev_monitor, 128*1024*1024);
 
                udev_list_entry_foreach(entry, udev_list_get_entry(&subsystem_match_list)) {
                        const char *subsys = udev_list_entry_get_name(entry);
@@ -183,6 +184,7 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[])
                        rc = 3;
                        goto out;
                }
+               udev_monitor_set_receive_buffer_size(udev, 128*1024*1024);
 
                udev_list_entry_foreach(entry, udev_list_get_entry(&subsystem_match_list)) {
                        const char *subsys = udev_list_entry_get_name(entry);