summaryrefslogtreecommitdiffstats
path: root/updater/updater.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-06-04 00:44:52 +0200
committerTianjie Xu <xunchang@google.com>2016-06-04 00:44:52 +0200
commit64f46fb16ccae69f7a826585c5eaba48fe1b05da (patch)
tree108cead8ed6bf16488fd843159eb61589ec2e6d2 /updater/updater.cpp
parentresolve merge conflicts of fe8e356 to nyc-dev-plus-aosp (diff)
parentCall ioctl before each write on retry (diff)
downloadandroid_bootable_recovery-64f46fb16ccae69f7a826585c5eaba48fe1b05da.tar
android_bootable_recovery-64f46fb16ccae69f7a826585c5eaba48fe1b05da.tar.gz
android_bootable_recovery-64f46fb16ccae69f7a826585c5eaba48fe1b05da.tar.bz2
android_bootable_recovery-64f46fb16ccae69f7a826585c5eaba48fe1b05da.tar.lz
android_bootable_recovery-64f46fb16ccae69f7a826585c5eaba48fe1b05da.tar.xz
android_bootable_recovery-64f46fb16ccae69f7a826585c5eaba48fe1b05da.tar.zst
android_bootable_recovery-64f46fb16ccae69f7a826585c5eaba48fe1b05da.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 f51a6db73..c222cee0d 100644
--- a/updater/updater.cpp
+++ b/updater/updater.cpp
@@ -51,7 +51,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;
}
@@ -145,6 +145,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) {