am 3af04b71: am 7c386a61: Merge "Extend and document the "wait" command"

* commit '3af04b71e51e89af02a1fe526e4fc32dce0100d3':
  Extend and document the "wait" command
diff --git a/init/builtins.c b/init/builtins.c
index bb963c1..aaf85d9 100644
--- a/init/builtins.c
+++ b/init/builtins.c
@@ -813,6 +813,8 @@
 {
     if (nargs == 2) {
         return wait_for_file(args[1], COMMAND_RETRY_TIMEOUT);
-    }
-    return -1;
+    } else if (nargs == 3) {
+        return wait_for_file(args[1], atoi(args[2]));
+    } else
+        return -1;
 }
diff --git a/init/readme.txt b/init/readme.txt
index df524a6..fe0d15d 100644
--- a/init/readme.txt
+++ b/init/readme.txt
@@ -207,6 +207,11 @@
    Trigger an event.  Used to queue an action from another
    action.
 
+wait <path> [ <timeout> ]
+  Poll for the existence of the given file and return when found,
+  or the timeout has been reached. If timeout is not specified it
+  currently defaults to five seconds.
+
 write <path> <string> [ <string> ]*
    Open the file at <path> and write one or more strings
    to it with write(2)