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

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

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

am: 09059679

Change-Id: I64ced357843629dd2716cb95d6f06e95fa061296
parents cee57a5f 09059679
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;