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

Commit fcf397ea authored by Yifan Hong's avatar Yifan Hong Committed by android-build-merger
Browse files

Merge "liblp: MetadataBuilder::HasBlockDevice" am: 6af857f2 am: 09059679

am: 11361f33

Change-Id: I61e6600b8e9c86d5b1613c016c0fe13833658261
parents 42a32a5f 11361f33
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -713,6 +713,11 @@ bool MetadataBuilder::FindBlockDeviceByName(const std::string& partition_name,
    return false;
}

bool MetadataBuilder::HasBlockDevice(const std::string& partition_name) const {
    uint32_t index;
    return FindBlockDeviceByName(partition_name, &index);
}

bool MetadataBuilder::GetBlockDeviceInfo(const std::string& partition_name,
                                         BlockDeviceInfo* info) const {
    uint32_t index;
+3 −0
Original line number Diff line number Diff line
@@ -248,6 +248,9 @@ class MetadataBuilder {
    // false is returned.
    bool ImportPartitions(const LpMetadata& metadata, const std::set<std::string>& partition_names);

    // Return true if a block device is found, else false.
    bool HasBlockDevice(const std::string& partition_name) const;

  private:
    MetadataBuilder();
    MetadataBuilder(const MetadataBuilder&) = delete;