From 8dcbd1b399b508ab7c5d51f7fd29bf055348fd51 Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Sun, 2 Apr 2017 03:12:15 +0000 Subject: Merge "Use regular check for partition name instead of CHECK()" am: 76cb4eeda6 am: cd66e52573 am: 705a4d72c8 Change-Id: Ie1f8e1c6ab9fddf1b355287f0c4e5fc0b2631441 (cherry picked from commit 2e797d9905df9ca3a6068a23f6ad6669b823657d) --- update_verifier/update_verifier.cpp | 7 ++++--- 1 file 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 -- cgit v1.2.3