summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-03-01 09:24:32 +0100
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-03-01 09:24:32 +0100
commit93015f75ba26bbdf43e06481b8d93e701dba0d17 (patch)
treec7619169afcf21edf6430e53dab1e54045c4dd41
parentSnap for 4620899 from 133d1d25d72b51f691c5ef1178250e3b8a3b9a47 to pi-release (diff)
parentMerge "Fix the behavior of undefined commands in BlockImageVerify" am: ac4818d6af am: 7b9a92c1e2 (diff)
downloadandroid_bootable_recovery-93015f75ba26bbdf43e06481b8d93e701dba0d17.tar
android_bootable_recovery-93015f75ba26bbdf43e06481b8d93e701dba0d17.tar.gz
android_bootable_recovery-93015f75ba26bbdf43e06481b8d93e701dba0d17.tar.bz2
android_bootable_recovery-93015f75ba26bbdf43e06481b8d93e701dba0d17.tar.lz
android_bootable_recovery-93015f75ba26bbdf43e06481b8d93e701dba0d17.tar.xz
android_bootable_recovery-93015f75ba26bbdf43e06481b8d93e701dba0d17.tar.zst
android_bootable_recovery-93015f75ba26bbdf43e06481b8d93e701dba0d17.zip
-rw-r--r--updater/blockimg.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/updater/blockimg.cpp b/updater/blockimg.cpp
index feb2aeb27..4f085b204 100644
--- a/updater/blockimg.cpp
+++ b/updater/blockimg.cpp
@@ -1727,9 +1727,11 @@ static Value* PerformBlockImageUpdate(const char* name, State* state,
const Command* cmd = cmd_map[params.cmdname];
+ // Skip the command if we explicitly set the corresponding function pointer to nullptr, e.g.
+ // "erase" during block_image_verify.
if (cmd->f == nullptr) {
- LOG(ERROR) << "failed to find the function for command [" << line << "]";
- goto pbiudone;
+ LOG(DEBUG) << "skip executing command [" << line << "]";
+ continue;
}
// Skip all commands before the saved last command index when resuming an update.