summaryrefslogtreecommitdiffstats
path: root/src/libsystemd/sd-journal/sd-journal.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 02:22:46 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 02:22:46 +0000
commitdf66ab078d7415dcd983ff92d225098db2c7244a (patch)
treeb8c6ffe2ccf913c52d04e69d9c2d62181f738ed4 /src/libsystemd/sd-journal/sd-journal.c
parentReleasing progress-linux version 252.23-1~deb12u1~progress6.99u1. (diff)
downloadsystemd-df66ab078d7415dcd983ff92d225098db2c7244a.tar.xz
systemd-df66ab078d7415dcd983ff92d225098db2c7244a.zip
Merging upstream version 252.25.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/libsystemd/sd-journal/sd-journal.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsystemd/sd-journal/sd-journal.c b/src/libsystemd/sd-journal/sd-journal.c
index c970876..852c373 100644
--- a/src/libsystemd/sd-journal/sd-journal.c
+++ b/src/libsystemd/sd-journal/sd-journal.c
@@ -1593,7 +1593,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;
}
@@ -2215,9 +2215,7 @@ _public_ int sd_journal_get_monotonic_usec(sd_journal *j, uint64_t *ret, sd_id12
if (r < 0)
return r;
- if (ret_boot_id)
- *ret_boot_id = o->entry.boot_id;
- else {
+ if (!ret_boot_id) {
sd_id128_t id;
r = sd_id128_get_boot(&id);
@@ -2230,6 +2228,8 @@ _public_ int sd_journal_get_monotonic_usec(sd_journal *j, uint64_t *ret, sd_id12
if (ret)
*ret = le64toh(o->entry.monotonic);
+ if (ret_boot_id)
+ *ret_boot_id = o->entry.boot_id;
return 0;
}