]> err.no Git - systemd/commitdiff
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 e93f4fe5270a3eb5e51506ae7d8d54204f24e9bd..937231ca4282d46355b01b738c51c6cbccf896ef 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 5f7a4845469de5020b0332c6dad37032cf27ed9e..1f1ec523fa66c43ed4092dc8561c7c8757f6c3fc 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;