Merge "Use regular check for partition name instead of CHECK()" am: 76cb4eeda6

am: cd66e52573

Change-Id: I1e2df685b2e5fbf3b1affc949faf1cfc0348ca9e
This commit is contained in:
Tianjie Xu
2017-04-02 03:08:14 +00:00
committed by android-build-merger
+4 -3
View File
@@ -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) { static bool read_blocks(const std::string& partition, const std::string& range_str) {
CHECK(partition == "system" || partition == "vendor") if (partition != "system" && partition != "vendor") {
<< "partition name should be system or vendor" << partition; 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" // 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. // (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 // Afterwards, update_verifier will read every block on the care_map_file of