mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
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.
This commit is contained in:
parent
430fbf8e7f
commit
f637726130
@ -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") ||
|
||||
|
Loading…
Reference in New Issue
Block a user