summaryrefslogtreecommitdiffstats
path: root/updater
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-06-16 20:20:30 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-06-16 20:20:30 +0200
commit254b8d0a999b6d435785d260a298e9f01db6dedb (patch)
tree5953146e33aa705cd18adbea64dbefd94d5f31d3 /updater
parenttests: Remove obsolete MTD support. am: 7eb60efa8d am: 28a425aa1f (diff)
parentCheck the results from applypatch am: 31f8cc84cf (diff)
downloadandroid_bootable_recovery-254b8d0a999b6d435785d260a298e9f01db6dedb.tar
android_bootable_recovery-254b8d0a999b6d435785d260a298e9f01db6dedb.tar.gz
android_bootable_recovery-254b8d0a999b6d435785d260a298e9f01db6dedb.tar.bz2
android_bootable_recovery-254b8d0a999b6d435785d260a298e9f01db6dedb.tar.lz
android_bootable_recovery-254b8d0a999b6d435785d260a298e9f01db6dedb.tar.xz
android_bootable_recovery-254b8d0a999b6d435785d260a298e9f01db6dedb.tar.zst
android_bootable_recovery-254b8d0a999b6d435785d260a298e9f01db6dedb.zip
Diffstat (limited to 'updater')
-rw-r--r--updater/blockimg.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/updater/blockimg.cpp b/updater/blockimg.cpp
index 7aff7fff7..f00bc4bff 100644
--- a/updater/blockimg.cpp
+++ b/updater/blockimg.cpp
@@ -1264,11 +1264,17 @@ static int PerformCommandDiff(CommandParameters& params) {
}
if (params.cmdname[0] == 'i') { // imgdiff
- ApplyImagePatch(params.buffer.data(), blocks * BLOCKSIZE, &patch_value,
- &RangeSinkWrite, &rss, nullptr, nullptr);
+ if (ApplyImagePatch(params.buffer.data(), blocks * BLOCKSIZE, &patch_value,
+ &RangeSinkWrite, &rss, nullptr, nullptr) != 0) {
+ fprintf(stderr, "Failed to apply image patch.\n");
+ return -1;
+ }
} else {
- ApplyBSDiffPatch(params.buffer.data(), blocks * BLOCKSIZE, &patch_value, 0,
- &RangeSinkWrite, &rss, nullptr);
+ if (ApplyBSDiffPatch(params.buffer.data(), blocks * BLOCKSIZE, &patch_value,
+ 0, &RangeSinkWrite, &rss, nullptr) != 0) {
+ fprintf(stderr, "Failed to apply bsdiff patch.\n");
+ return -1;
+ }
}
// We expect the output of the patcher to fill the tgt ranges exactly.