Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76cb4eed authored by Tianjie Xu's avatar Tianjie Xu Committed by Gerrit Code Review
Browse files

Merge "Use regular check for partition name instead of CHECK()"

parents 21d481c8 5a176c0d
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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