summaryrefslogtreecommitdiffstats
path: root/update_verifier/update_verifier.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2017-04-02 05:05:45 +0200
committerandroid-build-merger <android-build-merger@google.com>2017-04-02 05:05:45 +0200
commitcd66e52573cda80b8699266efbc60484886f040a (patch)
treeeb0adaa80148da6be6f8de46200adba834f46adb /update_verifier/update_verifier.cpp
parentMerge "Update_verifier should read blocks in EIO mode" (diff)
parentMerge "Use regular check for partition name instead of CHECK()" (diff)
downloadandroid_bootable_recovery-cd66e52573cda80b8699266efbc60484886f040a.tar
android_bootable_recovery-cd66e52573cda80b8699266efbc60484886f040a.tar.gz
android_bootable_recovery-cd66e52573cda80b8699266efbc60484886f040a.tar.bz2
android_bootable_recovery-cd66e52573cda80b8699266efbc60484886f040a.tar.lz
android_bootable_recovery-cd66e52573cda80b8699266efbc60484886f040a.tar.xz
android_bootable_recovery-cd66e52573cda80b8699266efbc60484886f040a.tar.zst
android_bootable_recovery-cd66e52573cda80b8699266efbc60484886f040a.zip
Diffstat (limited to 'update_verifier/update_verifier.cpp')
-rw-r--r--update_verifier/update_verifier.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/update_verifier/update_verifier.cpp b/update_verifier/update_verifier.cpp
index 72b6dccc5..59f136c90 100644
--- a/update_verifier/update_verifier.cpp
+++ b/update_verifier/update_verifier.cpp
@@ -74,9 +74,10 @@ static int dm_name_filter(const dirent* de) {
}
static bool read_blocks(const std::string& partition, const std::string& range_str) {
- CHECK(partition == "system" || partition == "vendor")
- << "partition name should be system or vendor" << partition;
-
+ if (partition != "system" && partition != "vendor") {
+ LOG(ERROR) << "partition name must be system or vendor: " << partition;
+ return false;
+ }
// Iterate the content of "/sys/block/dm-X/dm/name". If it matches "system"
// (or "vendor"), then dm-X is a dm-wrapped system/vendor partition.
// Afterwards, update_verifier will read every block on the care_map_file of