mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-26 22:52:34 +02:00
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:300300436 TEST=Verify on flashrom_tester Change-Id: I755891e0d8b5857650febe08c2094733cf1f4c79 Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/77887 Reviewed-by: Hsuan-ting Chen <roccochen@google.com> Tested-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
This commit is contained in:
parent
0dbf2ded28
commit
e188cc383e
@ -194,6 +194,7 @@ impl crate::Flashrom for FlashromCmd {
|
||||
|
||||
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 @@ impl crate::Flashrom for FlashromCmd {
|
||||
};
|
||||
|
||||
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))
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user