summaryrefslogtreecommitdiff
path: root/patchoat/patchoat.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2015-12-09 20:06:27 +0000
committer android-build-merger <android-build-merger@google.com> 2015-12-09 20:06:27 +0000
commit3dafd53ff90fc845c09b7206600ba9ff45e3fcbd (patch)
treec32c87552120021c091540e010722eb317d04441 /patchoat/patchoat.cc
parent863b80062eef25cc4f7d30436a5a144411187590 (diff)
parent7cbd95c2fb7ca3d1391ec92d1be2d81863e63dd2 (diff)
Merge "Add support for LZ4 compressed image files"
am: 7cbd95c2fb * commit '7cbd95c2fb7ca3d1391ec92d1be2d81863e63dd2': Add support for LZ4 compressed image files
Diffstat (limited to 'patchoat/patchoat.cc')
-rw-r--r--patchoat/patchoat.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/patchoat/patchoat.cc b/patchoat/patchoat.cc
index 723bb1762d..46ab34bea3 100644
--- a/patchoat/patchoat.cc
+++ b/patchoat/patchoat.cc
@@ -153,6 +153,12 @@ bool PatchOat::Patch(const std::string& image_location, off_t delta,
return false;
}
+ if (image_header.GetStorageMode() != ImageHeader::kStorageModeUncompressed) {
+ LOG(ERROR) << "Patchoat is not supported with compressed image files "
+ << input_image->GetPath();
+ return false;
+ }
+
/*bool is_image_pic = */IsImagePic(image_header, input_image->GetPath());
// Nothing special to do right now since the image always needs to get patched.
// Perhaps in some far-off future we may have images with relative addresses that are true-PIC.