diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-03-06 08:09:23 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-04-30 12:21:18 +0200 |
commit | df7ee95913c70088263c768723dc5572982221f9 (patch) | |
tree | f6598788481fa880c899386fb5389e36b4acee92 /src/udev/udev-watch.h | |
parent | Clarify that these values are in bytes (diff) | |
download | systemd-df7ee95913c70088263c768723dc5572982221f9.tar.xz systemd-df7ee95913c70088263c768723dc5572982221f9.zip |
udev: do not store inotify fd in a global variable
When manager_exit() or manager_free() is called, the global variable in
udev-watch.c is not set '-1'. Of course, that is safe, as the event source
for the inotify fd is unref()ed in manager_exit() and manager_free().
But let's not store fd globally.
Diffstat (limited to 'src/udev/udev-watch.h')
-rw-r--r-- | src/udev/udev-watch.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/udev/udev-watch.h b/src/udev/udev-watch.h index a15fa2767e..f5c55794c4 100644 --- a/src/udev/udev-watch.h +++ b/src/udev/udev-watch.h @@ -3,8 +3,7 @@ #include "sd-device.h" -int udev_watch_init(void); -int udev_watch_restore(void); -int udev_watch_begin(sd_device *dev); -int udev_watch_end(sd_device *dev); +int udev_watch_restore(int inotify_fd); +int udev_watch_begin(int inotify_fd, sd_device *dev); +int udev_watch_end(int inotify_fd, sd_device *dev); int udev_watch_lookup(int wd, sd_device **ret); |