A problem with systemd-tmpfiles has been observed where the service
failed just because one of the configuration directories could not be
read due to SELinux policy.
Complain about the failure, but try to go on.
https://bugzilla.redhat.com/show_bug.cgi?id=839736
Hashmap *fh = NULL;
char **files = NULL;
const char **p;
- int r = 0;
+ int r;
assert(dirs);
}
STRV_FOREACH(p, dirs) {
- if (files_add(fh, *p, suffix) < 0) {
- log_error("Failed to search for files.");
- r = -EINVAL;
- goto finish;
- }
+ r = files_add(fh, *p, suffix);
+ if (r < 0)
+ log_warning("Failed to search for files in %s: %s",
+ *p, strerror(-r));
}
files = hashmap_get_strv(fh);
goto finish;
}
qsort(files, hashmap_size(fh), sizeof(char *), base_cmp);
+ r = 0;
finish:
hashmap_free(fh);