diff options
author | cee1 <fykcee1@gmail.com> | 2011-03-18 10:03:41 +0800 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-03-28 21:42:31 +0200 |
commit | 37f85e66e8f396b6f758e063531b95531aef628e (patch) | |
tree | 4c914f49c19d6712b76fc1be5f58929a2aa9d5bc /src/readahead-replay.c | |
parent | f9276855a1d270b6c3f857cdaf2c4b49920c2228 (diff) |
util: detect page size runtime.
Some architectures support multiple machine types with diffenent
page sizes, and some machine types even support multiple
page sizes themselves.
Diffstat (limited to 'src/readahead-replay.c')
-rw-r--r-- | src/readahead-replay.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/readahead-replay.c b/src/readahead-replay.c index d2de7ef288..3984c36c3e 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; } |