chiark / gitweb /
mount: Don't stop the mountinfo parser if one line can't be read
[elogind.git] / src / readahead-common.c
index e01ae607c435bd32b085725c528f0692718e1189..d76188b71f4c09de305f2a6556059f39b7d98d72 100644 (file)
@@ -49,7 +49,7 @@ int file_verify(int fd, const char *fn, off_t file_size_max, struct stat *st) {
         }
 
         if (st->st_size <= 0 || st->st_size > file_size_max) {
-                log_debug("Not preloading file %s with size out of bounds %zi", fn, st->st_size);
+                log_debug("Not preloading file %s with size out of bounds %llu", fn, (unsigned long long) st->st_size);
                 return 0;
         }
 
@@ -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;