Anastasia Klimchuk has uploaded this change for review.

View Change

print.c: Print B (block-protect) test status of the chips

This also expands the column for test status by 1 more char, since
now maximum status is longer, PREWB vs PREW.

print.c runs when command line option `flashrom -L` is invoked.

Change-Id: If697fe3ba93dbe34bb8f7a9a4b1686fdb8b3ee58
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
---
M print.c
1 file changed, 13 insertions(+), 3 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/31/83131/1
diff --git a/print.c b/print.c
index 0caa0da..d05f7bf 100644
--- a/print.c
+++ b/print.c
@@ -122,7 +122,7 @@
for (i = strlen("Device"); i < maxchiplen; i++)
msg_ginfo(" ");

- msg_ginfo("Test");
+ msg_ginfo("Test ");
for (i = 0; i < border; i++)
msg_ginfo(" ");
msg_ginfo("Known");
@@ -140,7 +140,7 @@

for (i = 0; i < maxvendorlen + maxchiplen; i++)
msg_ginfo(" ");
- msg_ginfo("OK ");
+ msg_ginfo("OK ");
for (i = 0; i < border; i++)
msg_ginfo(" ");
msg_ginfo("Broken");
@@ -151,7 +151,7 @@
msg_ginfo(" ");
msg_gdbg("range [V]");
msg_ginfo("\n\n");
- msg_ginfo("(P = PROBE, R = READ, E = ERASE, W = WRITE, - = N/A)\n\n");
+ msg_ginfo("(P = PROBE, R = READ, E = ERASE, W = WRITE, B = block-protect, - = N/A)\n\n");

for (chip = flashchips; chip->name != NULL; chip++) {
/* Don't print generic entries. */
@@ -242,6 +242,12 @@
msg_ginfo("-");
else
msg_ginfo(" ");
+ if (chip->tested.wp == OK)
+ msg_ginfo("B");
+ else if (chip->tested.wp == NA)
+ msg_ginfo("-");
+ else
+ msg_ginfo(" ");
for (i = 0; i < border; i++)
msg_ginfo(" ");

@@ -261,6 +267,10 @@
msg_ginfo("W");
else
msg_ginfo(" ");
+ if (chip->tested.wp == BAD)
+ msg_ginfo("B");
+ else
+ msg_ginfo(" ");
for (i = 0; i < border + 1; i++)
msg_ginfo(" ");


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

Gerrit-MessageType: newchange
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: If697fe3ba93dbe34bb8f7a9a4b1686fdb8b3ee58
Gerrit-Change-Number: 83131
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm@chromium.org>