diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-05-23 03:51:25 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-05-23 03:51:25 +0200 |
commit | 08231e5142bff7ace79957835656672ac100031b (patch) | |
tree | d5fc6885d402acc6c3c74b8c8546382a6ea4e8af /src/readahead/sd-readahead.c | |
parent | e905f48fdc78fe3e4708aeb8515fc260eaf4eb6b (diff) |
readahead: avoid running of readahead services if readahead is already done
Diffstat (limited to 'src/readahead/sd-readahead.c')
-rw-r--r-- | src/readahead/sd-readahead.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/readahead/sd-readahead.c b/src/readahead/sd-readahead.c index a3340666dd..d48cd76807 100644 --- a/src/readahead/sd-readahead.c +++ b/src/readahead/sd-readahead.c @@ -57,7 +57,8 @@ static int touch(const char *path) { mkdir("/run/systemd", 0755); mkdir("/run/systemd/readahead", 0755); - if ((fd = open(path, O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY, 0666)) < 0) + fd = open(path, O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY, 0666); + if (fd < 0) return -errno; for (;;) { |