diff options
author | Tianjie Xu <xunchang@google.com> | 2017-04-02 05:01:16 +0200 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-04-02 05:01:18 +0200 |
commit | 76cb4eeda6fd7db5aadd74762fcdd05e3a860e45 (patch) | |
tree | 8ef817bf2e8100f36457ce12418b24db1663058b /update_verifier/update_verifier.cpp | |
parent | Merge "Update_verifier should read blocks in EIO mode" (diff) | |
parent | Use regular check for partition name instead of CHECK() (diff) | |
download | android_bootable_recovery-76cb4eeda6fd7db5aadd74762fcdd05e3a860e45.tar android_bootable_recovery-76cb4eeda6fd7db5aadd74762fcdd05e3a860e45.tar.gz android_bootable_recovery-76cb4eeda6fd7db5aadd74762fcdd05e3a860e45.tar.bz2 android_bootable_recovery-76cb4eeda6fd7db5aadd74762fcdd05e3a860e45.tar.lz android_bootable_recovery-76cb4eeda6fd7db5aadd74762fcdd05e3a860e45.tar.xz android_bootable_recovery-76cb4eeda6fd7db5aadd74762fcdd05e3a860e45.tar.zst android_bootable_recovery-76cb4eeda6fd7db5aadd74762fcdd05e3a860e45.zip |
Diffstat (limited to 'update_verifier/update_verifier.cpp')
-rw-r--r-- | update_verifier/update_verifier.cpp | 7 |
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 |