summaryrefslogtreecommitdiff
path: root/src/readahead-replay.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-09-25 13:32:54 +0200
committerLennart Poettering <lennart@poettering.net>2010-09-25 13:32:54 +0200
commit41a598e21a9f6cfe8dad7759c3c9facd55774acf (patch)
treeb74c8538677aaf55fa7d2bdacc6ebfbf4b57a40e /src/readahead-replay.c
parent4030d7a923427a50745fc5786f4905aa703f0bcb (diff)
readahead: disable on low memory machines
Diffstat (limited to 'src/readahead-replay.c')
-rw-r--r--src/readahead-replay.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/readahead-replay.c b/src/readahead-replay.c
index 1f1ec523fa..58d9468c43 100644
--- a/src/readahead-replay.c
+++ b/src/readahead-replay.c
@@ -206,6 +206,11 @@ int main(int argc, char*argv[]) {
log_parse_environment();
log_open();
+ if (!enough_ram()) {
+ log_info("Disabling readahead replay due to low memory.");
+ return 0;
+ }
+
if (replay(argc >= 2 ? argv[1] : "/") < 0)
return 1;