chiark / gitweb /
readahead: remove misleading error messages
authorLennart Poettering <lennart@poettering.net>
Fri, 18 Feb 2011 01:26:01 +0000 (02:26 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 18 Feb 2011 01:26:03 +0000 (02:26 +0100)
https://bugzilla.redhat.com/show_bug.cgi?id=678255

src/readahead-collect.c
src/readahead-replay.c

index 4ca6d74..ea07b3f 100644 (file)
@@ -96,6 +96,9 @@ static int pack_file(FILE *pack, const char *fn, bool on_btrfs) {
                 if (errno == ENOENT)
                         return 0;
 
+                if (errno == EPERM || errno == EACCES)
+                        return 0;
+
                 log_warning("open(%s) failed: %m", fn);
                 r = -errno;
                 goto finish;
index e9c573a..9447fe0 100644 (file)
@@ -62,7 +62,7 @@ static int unpack_file(FILE *pack) {
 
         if ((fd = open(fn, O_RDONLY|O_CLOEXEC|O_NOATIME|O_NOCTTY|O_NOFOLLOW)) < 0) {
 
-                if (errno != ENOENT)
+                if (errno != ENOENT && errno != EPERM && errno != EACCES)
                         log_warning("open(%s) failed: %m", fn);
 
         } else if (file_verify(fd, fn, arg_file_size_max, &st) <= 0) {