fd = open(fn, O_RDONLY|O_CLOEXEC|O_NOATIME|O_NOCTTY|O_NOFOLLOW);
if (fd < 0) {
- if (errno != ENOENT && errno != EPERM && errno != EACCES)
+ if (errno != ENOENT && errno != EPERM && errno != EACCES && errno != ELOOP)
log_warning("open(%s) failed: %m", fn);
} else if (file_verify(fd, fn, arg_file_size_max, &st) <= 0) {
block_bump_request_nr(root);
if (asprintf(&pack_fn, "%s/.readahead", root) < 0) {
- log_error("Out of memory");
- r = -ENOMEM;
+ r = log_oom();
goto finish;
}
- if ((!(pack = fopen(pack_fn, "re")))) {
+ pack = fopen(pack_fn, "re");
+ if (!pack) {
if (errno == ENOENT)
log_debug("No pack file found.");
else {