X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Freadahead-replay.c;h=0b84528b0ee3d27dbae8cc8ccaa75511e6322200;hp=3bea9295fc6795a2e4896388ba164424a9a94338;hb=f975e971accc4d50c73ae53167db3df7a7099cf2;hpb=2b590e135f53a1bd3e771bdc555f7bf28c4cd232 diff --git a/src/readahead-replay.c b/src/readahead-replay.c index 3bea9295f..0b84528b0 100644 --- a/src/readahead-replay.c +++ b/src/readahead-replay.c @@ -94,7 +94,7 @@ static int unpack_file(FILE *pack) { any = true; if (fd >= 0) - if (posix_fadvise(fd, b * PAGE_SIZE, (c - b) * PAGE_SIZE, POSIX_FADV_WILLNEED) < 0) { + if (posix_fadvise(fd, b * page_size(), (c - b) * page_size(), POSIX_FADV_WILLNEED) < 0) { log_warning("posix_fadvise() failed: %m"); goto finish; } @@ -122,7 +122,8 @@ static int replay(const char *root) { FILE *pack = NULL; char line[LINE_MAX]; int r = 0; - char *pack_fn = NULL, c; + char *pack_fn = NULL; + int c; bool on_ssd, ready = false; int prio; int inotify_fd = -1; @@ -192,7 +193,7 @@ static int replay(const char *root) { log_debug("Replaying..."); - if (access("/dev/.systemd/readahead/noreplay", F_OK) >= 0) { + if (access("/run/systemd/readahead/noreplay", F_OK) >= 0) { log_debug("Got termination request"); goto done; }