Scott Chao has uploaded this change for review.

View Change

flashrom_tester: Align WP output format with upstream

After WP output format changed, the flashrom_tester will always read
software write protect is disabled.

BUG=b:
TEST=Verify on flashrom_tester

Change-Id: I755891e0d8b5857650febe08c2094733cf1f4c79
Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com>
---
M util/flashrom_tester/flashrom/src/cmd.rs
1 file changed, 2 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/87/77887/1
diff --git a/util/flashrom_tester/flashrom/src/cmd.rs b/util/flashrom_tester/flashrom/src/cmd.rs
index 1f13a8e..9e66fe2 100644
--- a/util/flashrom_tester/flashrom/src/cmd.rs
+++ b/util/flashrom_tester/flashrom/src/cmd.rs
@@ -194,6 +194,7 @@

fn wp_status(&self, en: bool) -> Result<bool, FlashromError> {
let status = if en { "en" } else { "dis" };
+ let protection_mode = if en { "hardware" } else { "disable" };
info!("See if chip write protect is {}abled", status);

let opts = FlashromOpt {
@@ -205,7 +206,7 @@
};

let (stdout, _) = self.dispatch(opts, "wp_status")?;
- let s = std::format!("write protect is {}abled", status);
+ let s = std::format!("Protection mode: {}", protection_mode);
Ok(stdout.contains(&s))
}


To view, visit change 77887. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I755891e0d8b5857650febe08c2094733cf1f4c79
Gerrit-Change-Number: 77887
Gerrit-PatchSet: 1
Gerrit-Owner: Scott Chao <scott_chao@wistron.corp-partner.google.com>
Gerrit-MessageType: newchange