diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-05-27 03:43:54 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-08-02 04:16:33 +0200 |
commit | f49faf056211509aa726c0e5983c42171f410410 (patch) | |
tree | e6872eb1417b6ecc54827f409afdce7ea3df86cc /src/libudev | |
parent | sd-device-monitor: replace -1 with -EBADF (diff) | |
download | systemd-f49faf056211509aa726c0e5983c42171f410410.tar.xz systemd-f49faf056211509aa726c0e5983c42171f410410.zip |
sd-device-monitor: bind socket in device_monitor_new_full()
Previously, device_monitor_enable_receiving() does
- update filter,
- bind socket.
But, binding socket can be done in when the socket is opened.
Let's remove device_monitor_enable_receiving() and bind the socket in
device_monitor_new_full().
Diffstat (limited to 'src/libudev')
-rw-r--r-- | src/libudev/libudev-monitor.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libudev/libudev-monitor.c b/src/libudev/libudev-monitor.c index d7c931d9f9..b283154c40 100644 --- a/src/libudev/libudev-monitor.c +++ b/src/libudev/libudev-monitor.c @@ -109,14 +109,12 @@ _public_ int udev_monitor_filter_update(struct udev_monitor *udev_monitor) { * udev_monitor_enable_receiving: * @udev_monitor: the monitor which should receive events * - * Binds the @udev_monitor socket to the event source. + * Deprecated, and alias of udev_monitor_filter_update(). * * Returns: 0 on success, otherwise a negative error value. */ _public_ int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor) { - assert_return(udev_monitor, -EINVAL); - - return device_monitor_enable_receiving(udev_monitor->monitor); + return udev_monitor_filter_update(udev_monitor); } /** |