summaryrefslogtreecommitdiffstats
path: root/otafault/config.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2017-01-09 22:45:37 +0100
committerTianjie Xu <xunchang@google.com>2017-01-09 23:51:15 +0100
commit4728242070ce806828024f00ab3dac6ba48f3206 (patch)
tree3d5a73e42eb083104c4d83d76d78e56ed871a2c0 /otafault/config.cpp
parentMerge "recovery: Clean up try_update_binary() in install.cpp." (diff)
downloadandroid_bootable_recovery-4728242070ce806828024f00ab3dac6ba48f3206.tar
android_bootable_recovery-4728242070ce806828024f00ab3dac6ba48f3206.tar.gz
android_bootable_recovery-4728242070ce806828024f00ab3dac6ba48f3206.tar.bz2
android_bootable_recovery-4728242070ce806828024f00ab3dac6ba48f3206.tar.lz
android_bootable_recovery-4728242070ce806828024f00ab3dac6ba48f3206.tar.xz
android_bootable_recovery-4728242070ce806828024f00ab3dac6ba48f3206.tar.zst
android_bootable_recovery-4728242070ce806828024f00ab3dac6ba48f3206.zip
Diffstat (limited to 'otafault/config.cpp')
-rw-r--r--otafault/config.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/otafault/config.cpp b/otafault/config.cpp
index ee4ef8911..8590833ee 100644
--- a/otafault/config.cpp
+++ b/otafault/config.cpp
@@ -29,21 +29,23 @@
#define OTAIO_MAX_FNAME_SIZE 128
static ZipArchiveHandle archive;
+static bool is_retry = false;
static std::map<std::string, bool> should_inject_cache;
static std::string get_type_path(const char* io_type) {
return android::base::StringPrintf("%s/%s", OTAIO_BASE_DIR, io_type);
}
-void ota_io_init(ZipArchiveHandle za) {
+void ota_io_init(ZipArchiveHandle za, bool retry) {
archive = za;
+ is_retry = retry;
ota_set_fault_files();
}
bool should_fault_inject(const char* io_type) {
// archive will be NULL if we used an entry point other
// than updater/updater.cpp:main
- if (archive == NULL) {
+ if (archive == nullptr || is_retry) {
return false;
}
const std::string type_path = get_type_path(io_type);