summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-04-25 00:23:45 +0200
committerLennart Poettering <lennart@poettering.net>2016-04-25 12:00:03 +0200
commitf63772613098f57fdeeef603791e9d5faa4f0790 (patch)
treee79882e151cd3ed42c0576827107edd31b6f3609 /src
parent430fbf8e7ff4368f6d43a8f86e0bc6494b0a979c (diff)
sd-journal: properly collect errors from readdir()
Let's also collect errors returned by readdir() into our set of errors, like we do this for all other errors from journal files.
Diffstat (limited to 'src')
-rw-r--r--src/journal/sd-journal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index 7ae8941a5e..44bf8ab511 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -1429,7 +1429,7 @@ static int add_directory(sd_journal *j, const char *prefix, const char *dirname)
inotify_rm_watch(j->inotify_fd, m->wd);
}
- FOREACH_DIRENT_ALL(de, d, return log_debug_errno(errno, "Failed to read directory %s: %m", m->path)) {
+ FOREACH_DIRENT_ALL(de, d, r = log_debug_errno(errno, "Failed to read directory %s: %m", m->path); goto fail) {
if (dirent_is_file_with_suffix(de, ".journal") ||
dirent_is_file_with_suffix(de, ".journal~"))
@@ -1516,7 +1516,7 @@ static int add_root_directory(sd_journal *j, const char *p, bool missing_ok) {
if (j->no_new_files)
return 0;
- FOREACH_DIRENT_ALL(de, d, return log_debug_errno(errno, "Failed to read directory %s: %m", m->path)) {
+ FOREACH_DIRENT_ALL(de, d, r = log_debug_errno(errno, "Failed to read directory %s: %m", m->path); goto fail) {
sd_id128_t id;
if (dirent_is_file_with_suffix(de, ".journal") ||