David Hendricks has uploaded this change for review.
linux_mtd: display correct write-protect info
The wp_status call to linux_mtd currently display nothing if
write-protect is disabled. Display correct message and match the output
with other driver.
BUG=chrome-os-partner:40208
TEST=`flashrom --wp-disable; flashrom --wp-status` should display:
WP: write protect is disabled.
WP: write protect range: start=0x00000000, len=0x00000000
Change-Id: Icc3727702d2813b875a7e3a7151b44a7853967bd
Reviewed-on: https://chromium-review.googlesource.com/340882
Commit-Ready: Wei-Ning Huang <wnhuang@chromium.org>
Tested-by: Wei-Ning Huang <wnhuang@chromium.org>
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
---
M linux_mtd.c
1 file changed, 6 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/07/22507/1
diff --git a/linux_mtd.c b/linux_mtd.c
index 6055aef..f09c572 100644
--- a/linux_mtd.c
+++ b/linux_mtd.c
@@ -505,14 +505,16 @@
}
if (start_found && end_found) {
- msg_pinfo("WP: write protect range: start=0x%08x, "
- "len=0x%08x\n", start, end - start);
- /* TODO: Replace this break with "start = end = 0" if
- * we want to support non-contiguous locked regions */
+ /* TODO: changes required for supporting non-contiguous locked regions */
break;
}
}
+ msg_cinfo("WP: write protect is %s.\n",
+ (start_found && end_found)? "enabled": "disabled");
+ msg_pinfo("WP: write protect range: start=0x%08x, "
+ "len=0x%08x\n", start, end - start);
+
return 0;
}
To view, visit change 22507. To unsubscribe, visit settings.