diff options
author | Tianjie Xu <xunchang@google.com> | 2018-08-27 19:50:31 +0200 |
---|---|---|
committer | Tianjie Xu <xunchang@google.com> | 2018-08-28 02:16:19 +0200 |
commit | 22f11205a1f0d534c10e88e40f09b92c9faa161c (patch) | |
tree | 9b6e1bd187fe17b71654a83ebe61859191559a49 /updater/updater.cpp | |
parent | Merge "updater: Add TransferList class." (diff) | |
download | android_bootable_recovery-22f11205a1f0d534c10e88e40f09b92c9faa161c.tar android_bootable_recovery-22f11205a1f0d534c10e88e40f09b92c9faa161c.tar.gz android_bootable_recovery-22f11205a1f0d534c10e88e40f09b92c9faa161c.tar.bz2 android_bootable_recovery-22f11205a1f0d534c10e88e40f09b92c9faa161c.tar.lz android_bootable_recovery-22f11205a1f0d534c10e88e40f09b92c9faa161c.tar.xz android_bootable_recovery-22f11205a1f0d534c10e88e40f09b92c9faa161c.tar.zst android_bootable_recovery-22f11205a1f0d534c10e88e40f09b92c9faa161c.zip |
Diffstat (limited to 'updater/updater.cpp')
-rw-r--r-- | updater/updater.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/updater/updater.cpp b/updater/updater.cpp index e06d45355..e87c57a5c 100644 --- a/updater/updater.cpp +++ b/updater/updater.cpp @@ -31,7 +31,6 @@ #include <ziparchive/zip_archive.h> #include "edify/expr.h" -#include "otafault/config.h" #include "otautil/dirutil.h" #include "otautil/error_code.h" #include "otautil/sysutil.h" @@ -47,8 +46,6 @@ // (Note it's "updateR-script", not the older "update-script".) static constexpr const char* SCRIPT_NAME = "META-INF/com/google/android/updater-script"; -extern bool have_eio_error; - struct selabel_handle *sehandle; static void UpdaterLogger(android::base::LogId /* id */, android::base::LogSeverity /* severity */, @@ -166,15 +163,10 @@ int main(int argc, char** argv) { printf("unexpected argument: %s", argv[4]); } } - ota_io_init(za, state.is_retry); std::string result; bool status = Evaluate(&state, root, &result); - if (have_eio_error) { - fprintf(cmd_pipe, "retry_update\n"); - } - if (!status) { if (state.errmsg.empty()) { LOG(ERROR) << "script aborted (no error message)"; @@ -206,6 +198,9 @@ int main(int argc, char** argv) { if (state.cause_code == kPatchApplicationFailure) { LOG(INFO) << "Patch application failed, retry update."; fprintf(cmd_pipe, "retry_update\n"); + } else if (state.cause_code == kEioFailure) { + LOG(INFO) << "Update failed due to EIO, retry update."; + fprintf(cmd_pipe, "retry_update\n"); } } |