summaryrefslogtreecommitdiffstats
path: root/src/libsystemd/sd-journal
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-04-19 06:19:00 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2024-04-19 11:10:55 +0200
commitd5f24a0ea9ec6f5ddb0eb9d4c366d22400706f08 (patch)
tree9a415da2d721802632d653f4d03c9a6f40c18322 /src/libsystemd/sd-journal
parentupdate TODO (diff)
downloadsystemd-d5f24a0ea9ec6f5ddb0eb9d4c366d22400706f08.tar.xz
systemd-d5f24a0ea9ec6f5ddb0eb9d4c366d22400706f08.zip
sd-event,sd-journal: fix error handling of inotify_add_watch_fd()
Fixes a bug in 97ef5391697c34ee1c763fa9bddcd20a29ff3159 and 858749f7312bd0adb5433075a92e1c35a2fb56ac.
Diffstat (limited to 'src/libsystemd/sd-journal')
-rw-r--r--src/libsystemd/sd-journal/sd-journal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-journal/sd-journal.c b/src/libsystemd/sd-journal/sd-journal.c
index a4ed3804d8..713cdcc0ec 100644
--- a/src/libsystemd/sd-journal/sd-journal.c
+++ b/src/libsystemd/sd-journal/sd-journal.c
@@ -1973,7 +1973,7 @@ static void directory_watch(sd_journal *j, Directory *m, int fd, uint32_t mask)
m->wd = inotify_add_watch_fd(j->inotify_fd, fd, mask);
if (m->wd < 0) {
- log_debug_errno(errno, "Failed to watch journal directory '%s', ignoring: %m", m->path);
+ log_debug_errno(m->wd, "Failed to watch journal directory '%s', ignoring: %m", m->path);
return;
}