diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-09-17 23:03:14 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2022-09-18 10:51:25 +0200 |
commit | a1c3628b19ddd9b8eab305806fca1a4f37a33559 (patch) | |
tree | 38819570da4acd9f1be91e615d0a7f163e39454e /src/udev | |
parent | dissect-image: lazily deactivate decrypted DM volumes (diff) | |
download | systemd-a1c3628b19ddd9b8eab305806fca1a4f37a33559.tar.xz systemd-a1c3628b19ddd9b8eab305806fca1a4f37a33559.zip |
udev: downgrade log level when device node is already removed
Follow-up for 790da548b0c37af60aed2f46867ba3885ea78718.
Diffstat (limited to 'src/udev')
-rw-r--r-- | src/udev/udev-event.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c index 7bff311543..d4622b2f9d 100644 --- a/src/udev/udev-event.c +++ b/src/udev/udev-event.c @@ -1163,6 +1163,7 @@ void udev_event_process_inotify_watch(UdevEvent *event, int inotify_fd) { return; r = udev_watch_begin(inotify_fd, dev); - if (r < 0) - log_device_warning_errno(dev, r, "Failed to add inotify watch, ignoring: %m"); + if (r < 0) /* The device may be already removed, downgrade log level in that case. */ + log_device_full_errno(dev, r == -ENOENT ? LOG_DEBUG : LOG_WARNING, r, + "Failed to add inotify watch, ignoring: %m"); } |