summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-09-29 02:54:09 +0200
committerLennart Poettering <lennart@poettering.net>2010-09-29 02:55:40 +0200
commit43be53513acba2b205fca248ff46cfd3ed7cfda8 (patch)
tree701c436af076d065a08b6df1ad958197464ffc8e
parentc7b508592b28ee1e62350f0d249856811371f631 (diff)
readahead: make sure /dev/.systemd/readahead exists
-rw-r--r--src/readahead-common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/readahead-common.c b/src/readahead-common.c
index e01ae607c4..a8f6fb30f8 100644
--- a/src/readahead-common.c
+++ b/src/readahead-common.c
@@ -145,6 +145,9 @@ ReadaheadShared *shared_get(void) {
int fd;
ReadaheadShared *m = NULL;
+ mkdir("/dev/.systemd", 0755);
+ mkdir("/dev/.systemd/readahead", 0755);
+
if ((fd = open("/dev/.systemd/readahead/shared", O_CREAT|O_RDWR|O_CLOEXEC, 0644)) < 0) {
log_error("Failed to create shared memory segment: %m");
goto finish;