X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Freadahead-common.c;h=d76188b71f4c09de305f2a6556059f39b7d98d72;hb=560d8f23811162542c1748f711ea6dce269d2720;hp=e01ae607c435bd32b085725c528f0692718e1189;hpb=d9c7a87b35289e9a5ba94c097e861640d1357e6d;p=elogind.git diff --git a/src/readahead-common.c b/src/readahead-common.c index e01ae607c..d76188b71 100644 --- a/src/readahead-common.c +++ b/src/readahead-common.c @@ -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;