Merge "Add new dm-verity error handling mode"
This commit is contained in:
commit
26e5d8f1e2
|
@ -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;
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue