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

Commit f3405ad7 authored by Paul Lawrence's avatar Paul Lawrence
Browse files

Fix ext4/metadata/udc issue

Test: Cannot currently test since no device supports this combo
Bug: 137924328
Change-Id: I6474211e7229323da831f99d9572283e0c2d49df
parent c4117afd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -218,7 +218,8 @@ std::string DmTargetCrypt::GetParameterString() const {
}

std::string DmTargetDefaultKey::GetParameterString() const {
    return cipher_ + " " + key_ + " " + blockdev_ + " " + std::to_string(start_sector_);
    return cipher_ + " " + key_ + " " + blockdev_ + " " + std::to_string(start_sector_) +
           (set_dun_ ? " 1 set_dun" : "");
}

}  // namespace dm
+5 −2
Original line number Diff line number Diff line
@@ -277,12 +277,14 @@ class DmTargetCrypt final : public DmTarget {
class DmTargetDefaultKey final : public DmTarget {
  public:
    DmTargetDefaultKey(uint64_t start, uint64_t length, const std::string& cipher,
                       const std::string& key, const std::string& blockdev, uint64_t start_sector)
                       const std::string& key, const std::string& blockdev, uint64_t start_sector,
                       bool set_dun = false)
        : DmTarget(start, length),
          cipher_(cipher),
          key_(key),
          blockdev_(blockdev),
          start_sector_(start_sector) {}
          start_sector_(start_sector),
          set_dun_(set_dun) {}

    std::string name() const override { return "default-key"; }
    bool Valid() const override { return true; }
@@ -293,6 +295,7 @@ class DmTargetDefaultKey final : public DmTarget {
    std::string key_;
    std::string blockdev_;
    uint64_t start_sector_;
    bool set_dun_;
};

}  // namespace dm