chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: add tests of strxcpyx
[elogind.git]
/
src
/
readahead
/
readahead-replay.c
diff --git
a/src/readahead/readahead-replay.c
b/src/readahead/readahead-replay.c
index 6e6db601d45a101356ee9cadb907104810ba184d..cb04e5f9cde051fb2a1965be2fb9450ee39d0b90 100644
(file)
--- a/
src/readahead/readahead-replay.c
+++ b/
src/readahead/readahead-replay.c
@@
-64,7
+64,7
@@
static int unpack_file(FILE *pack) {
fd = open(fn, O_RDONLY|O_CLOEXEC|O_NOATIME|O_NOCTTY|O_NOFOLLOW);
if (fd < 0) {
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) {
log_warning("open(%s) failed: %m", fn);
} else if (file_verify(fd, fn, arg_file_size_max, &st) <= 0) {
@@
-150,12
+150,12
@@
static int replay(const char *root) {
block_bump_request_nr(root);
if (asprintf(&pack_fn, "%s/.readahead", root) < 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;
}
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 {
if (errno == ENOENT)
log_debug("No pack file found.");
else {