summaryrefslogtreecommitdiff
path: root/src/udev/udev-watch.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-03-06 16:09:23 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-04-30 19:21:18 +0900
commitdf7ee95913c70088263c768723dc5572982221f9 (patch)
treef6598788481fa880c899386fb5389e36b4acee92 /src/udev/udev-watch.h
parent88c2c8a0ba13de31061a22a352410c18ffacab9a (diff)
downloadsystemd-df7ee95913c70088263c768723dc5572982221f9.tar.gz
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.h7
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);