diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-10-02 10:00:00 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-10-07 09:40:32 +0200 |
commit | cbda8bd5fba097a6c90262828e8934b63e2efb22 (patch) | |
tree | 9baf15a53ca1ebed9abb654b3b7c484ff18ed3cf /src/udev/udev-ctrl.c | |
parent | sd-event: support callback=NULL in IO/child/inotify/defer event sources, too (diff) | |
download | systemd-cbda8bd5fba097a6c90262828e8934b63e2efb22.tar.xz systemd-cbda8bd5fba097a6c90262828e8934b63e2efb22.zip |
udev: make use of NULL callback in IO handlers
Diffstat (limited to '')
-rw-r--r-- | src/udev/udev-ctrl.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/udev/udev-ctrl.c b/src/udev/udev-ctrl.c index dafe3da251..9deb3864b5 100644 --- a/src/udev/udev-ctrl.c +++ b/src/udev/udev-ctrl.c @@ -355,10 +355,6 @@ int udev_ctrl_send(struct udev_ctrl *uctrl, enum udev_ctrl_msg_type type, int in return 0; } -static int udev_ctrl_wait_io_handler(sd_event_source *s, int fd, uint32_t revents, void *userdata) { - return sd_event_exit(sd_event_source_get_event(s), 0); -} - int udev_ctrl_wait(struct udev_ctrl *uctrl, usec_t timeout) { _cleanup_(sd_event_source_unrefp) sd_event_source *source_io = NULL, *source_timeout = NULL; int r; @@ -385,7 +381,7 @@ int udev_ctrl_wait(struct udev_ctrl *uctrl, usec_t timeout) { return r; } - r = sd_event_add_io(uctrl->event, &source_io, uctrl->sock, EPOLLIN, udev_ctrl_wait_io_handler, NULL); + r = sd_event_add_io(uctrl->event, &source_io, uctrl->sock, EPOLLIN, NULL, INT_TO_PTR(0)); if (r < 0) return r; |