summaryrefslogtreecommitdiffstats
path: root/src/udev/udev-watch.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-10-25 23:07:30 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2022-10-31 21:12:27 +0100
commit04b2541000c0071c7e538dee42759b99562446b7 (patch)
tree841c3b656ebac6634bbb04358c79291013a86620 /src/udev/udev-watch.c
parentudev: Handle AMBA bus the same way as generic platform bus (diff)
downloadsystemd-04b2541000c0071c7e538dee42759b99562446b7.tar.xz
systemd-04b2541000c0071c7e538dee42759b99562446b7.zip
udev: drop trivial wrapper for udev_watch_begin()
Diffstat (limited to 'src/udev/udev-watch.c')
-rw-r--r--src/udev/udev-watch.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/udev/udev-watch.c b/src/udev/udev-watch.c
index abd1d8fea5..6bb013c094 100644
--- a/src/udev/udev-watch.c
+++ b/src/udev/udev-watch.c
@@ -17,6 +17,7 @@
#include "rm-rf.h"
#include "stdio-util.h"
#include "string-util.h"
+#include "udev-util.h"
#include "udev-watch.h"
int device_new_from_watch_handle_at(sd_device **ret, int dirfd, int wd) {
@@ -180,6 +181,9 @@ int udev_watch_begin(int inotify_fd, sd_device *dev) {
assert(inotify_fd >= 0);
assert(dev);
+ if (device_for_action(dev, SD_DEVICE_REMOVE))
+ return 0;
+
r = sd_device_get_devname(dev, &devnode);
if (r < 0)
return log_device_debug_errno(dev, r, "Failed to get device node: %m");