summaryrefslogtreecommitdiffstats
path: root/updater/updater.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-05-31 18:29:49 +0200
committerTianjie Xu <xunchang@google.com>2016-06-03 21:12:50 +0200
commit7ce287d432dd3a4dc8841fc59e11ee1a0b7808a1 (patch)
tree9e1a3f6c63abe5ceb130b93699fb0d7df43ec0ec /updater/updater.cpp
parentMerge "Allow recovery to return error codes" into nyc-dev (diff)
downloadandroid_bootable_recovery-7ce287d432dd3a4dc8841fc59e11ee1a0b7808a1.tar
android_bootable_recovery-7ce287d432dd3a4dc8841fc59e11ee1a0b7808a1.tar.gz
android_bootable_recovery-7ce287d432dd3a4dc8841fc59e11ee1a0b7808a1.tar.bz2
android_bootable_recovery-7ce287d432dd3a4dc8841fc59e11ee1a0b7808a1.tar.lz
android_bootable_recovery-7ce287d432dd3a4dc8841fc59e11ee1a0b7808a1.tar.xz
android_bootable_recovery-7ce287d432dd3a4dc8841fc59e11ee1a0b7808a1.tar.zst
android_bootable_recovery-7ce287d432dd3a4dc8841fc59e11ee1a0b7808a1.zip
Diffstat (limited to 'updater/updater.cpp')
-rw-r--r--updater/updater.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/updater/updater.cpp b/updater/updater.cpp
index b5db71e2a..e956dd557 100644
--- a/updater/updater.cpp
+++ b/updater/updater.cpp
@@ -48,7 +48,7 @@ int main(int argc, char** argv) {
setbuf(stdout, NULL);
setbuf(stderr, NULL);
- if (argc != 4) {
+ if (argc != 4 && argc != 5) {
printf("unexpected number of arguments (%d)\n", argc);
return 1;
}
@@ -142,6 +142,14 @@ int main(int argc, char** argv) {
state.script = script;
state.errmsg = NULL;
+ if (argc == 5) {
+ if (strcmp(argv[4], "retry") == 0) {
+ state.is_retry = true;
+ } else {
+ printf("unexpected argument: %s", argv[4]);
+ }
+ }
+
char* result = Evaluate(&state, root);
if (have_eio_error) {