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

Commit 26e5d8f1 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Add new dm-verity error handling mode"

parents 23a50b38 9eb1296e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -95,7 +95,9 @@ void DmTargetVerity::UseFec(const std::string& device, uint32_t num_roots, uint3
}

void DmTargetVerity::SetVerityMode(const std::string& mode) {
    if (mode != "restart_on_corruption" && mode != "ignore_corruption") {
    if (mode != "panic_on_corruption" &&
        mode != "restart_on_corruption" &&
        mode != "ignore_corruption") {
        LOG(ERROR) << "Unknown verity mode: " << mode;
        valid_ = false;
        return;
+3 −1
Original line number Diff line number Diff line
@@ -61,7 +61,9 @@ bool ConstructVerityTable(const FsAvbHashtreeDescriptor& hashtree_desc,

    // Converts veritymode to the format used in kernel.
    std::string dm_verity_mode;
    if (verity_mode == "enforcing") {
    if (verity_mode == "panicking") {
        dm_verity_mode = "panic_on_corruption";
    } else if (verity_mode == "enforcing") {
        dm_verity_mode = "restart_on_corruption";
    } else if (verity_mode == "logging") {
        dm_verity_mode = "ignore_corruption";