X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Freadahead-common.c;h=8a75b2e135263315ff5721802186b1ca6094905b;hp=e991dfd05d69d130e4aee283acfa83a257b95c8b;hb=ec2002f84928c0b5921a961cb2b8637563f29daa;hpb=2b590e135f53a1bd3e771bdc555f7bf28c4cd232 diff --git a/src/readahead-common.c b/src/readahead-common.c index e991dfd05..8a75b2e13 100644 --- a/src/readahead-common.c +++ b/src/readahead-common.c @@ -167,11 +167,11 @@ int open_inotify(void) { return -errno; } - mkdir("/dev/.systemd", 0755); - mkdir("/dev/.systemd/readahead", 0755); + mkdir("/run/systemd", 0755); + mkdir("/run/systemd/readahead", 0755); - if (inotify_add_watch(fd, "/dev/.systemd/readahead", IN_CREATE) < 0) { - log_error("Failed to watch /dev/.systemd/readahead: %m"); + if (inotify_add_watch(fd, "/run/systemd/readahead", IN_CREATE) < 0) { + log_error("Failed to watch /run/systemd/readahead: %m"); close_nointr_nofail(fd); return -errno; } @@ -183,10 +183,10 @@ ReadaheadShared *shared_get(void) { int fd; ReadaheadShared *m = NULL; - mkdir("/dev/.systemd", 0755); - mkdir("/dev/.systemd/readahead", 0755); + mkdir("/run/systemd", 0755); + mkdir("/run/systemd/readahead", 0755); - if ((fd = open("/dev/.systemd/readahead/shared", O_CREAT|O_RDWR|O_CLOEXEC, 0644)) < 0) { + if ((fd = open("/run/systemd/readahead/shared", O_CREAT|O_RDWR|O_CLOEXEC, 0644)) < 0) { log_error("Failed to create shared memory segment: %m"); goto finish; } @@ -209,7 +209,6 @@ finish: return m; } - #define BUMP_REQUEST_NR (16*1024) int bump_request_nr(const char *p) {