chiark / gitweb /
readahead: take file system root on command line
authorLennart Poettering <lennart@poettering.net>
Fri, 24 Sep 2010 09:12:10 +0000 (11:12 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 24 Sep 2010 09:12:10 +0000 (11:12 +0200)
src/readahead-collect.c
src/readahead-replay.c

index e93f4fe..937231c 100644 (file)
@@ -437,11 +437,12 @@ finish:
 }
 
 int main(int argc, char *argv[]) {
+
         log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
         log_parse_environment();
         log_open();
 
-        if (collect("/") < 0)
+        if (collect(argc >= 2 ? argv[1] : "/") < 0)
                 return 1;
 
         return 0;
index 5f7a484..1f1ec52 100644 (file)
@@ -201,11 +201,12 @@ finish:
 }
 
 int main(int argc, char*argv[]) {
+
         log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
         log_parse_environment();
         log_open();
 
-        if (replay("/") < 0)
+        if (replay(argc >= 2 ? argv[1] : "/") < 0)
                 return 1;
 
         return 0;