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

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

Merge "liblp: MetadataBuilder::HasBlockDevice"

am: 6af857f2

Change-Id: I9a48c1807c6d491e210b562ea32e7dd965d7f967
parents fab35114 6af857f2
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;