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

Commit 39b0bac0 authored by Jooyung Han's avatar Jooyung Han
Browse files

first_stage_init: Remove unused field

The field (need_dm_verity_) is not used except in GetDmVerityDevices()
method.

Bug: 413174275
Test: presubmit (remove unsed field)
Change-Id: I9c018c02b0c12ad3efbe5aee79534817b9f434e7
parent 485500f0
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -113,7 +113,6 @@ class FirstStageMountVBootV2 : public FirstStageMount {

    bool InitAvbHandle();

    bool need_dm_verity_;
    bool dsu_not_on_userdata_ = false;
    bool use_snapuserd_ = false;

@@ -726,7 +725,7 @@ void FirstStageMountVBootV2::UseDsuIfPresent() {
}

FirstStageMountVBootV2::FirstStageMountVBootV2(Fstab fstab)
    : need_dm_verity_(false), fstab_(std::move(fstab)), avb_handle_(nullptr) {
    : fstab_(std::move(fstab)), avb_handle_(nullptr) {
    super_partition_name_ = fs_mgr_get_super_partition_name();

    std::string device_tree_vbmeta_parts;
@@ -750,14 +749,14 @@ FirstStageMountVBootV2::FirstStageMountVBootV2(Fstab fstab)
}

bool FirstStageMountVBootV2::GetDmVerityDevices(std::set<std::string>* devices) {
    need_dm_verity_ = false;
    bool need_dm_verity = false;

    std::set<std::string> logical_partitions;

    // fstab_rec->blk_device has A/B suffix.
    for (const auto& fstab_entry : fstab_) {
        if (fstab_entry.fs_mgr_flags.avb) {
            need_dm_verity_ = true;
            need_dm_verity = true;
        }
        // Skip pseudo filesystems.
        if (fstab_entry.fs_type == "overlay") {
@@ -773,7 +772,7 @@ bool FirstStageMountVBootV2::GetDmVerityDevices(std::set<std::string>* devices)

    // Any partitions needed for verifying the partitions used in first stage mount, e.g. vbmeta
    // must be provided as vbmeta_partitions.
    if (need_dm_verity_) {
    if (need_dm_verity) {
        if (vbmeta_partitions_.empty()) {
            LOG(ERROR) << "Missing vbmeta partitions";
            return false;