chiark / gitweb /
readahead: make sure /dev/.systemd/readahead exists
authorLennart Poettering <lennart@poettering.net>
Wed, 29 Sep 2010 00:54:09 +0000 (02:54 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 29 Sep 2010 00:55:40 +0000 (02:55 +0200)
src/readahead-common.c

index e01ae60..a8f6fb3 100644 (file)
@@ -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;