diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2008-11-28 23:45:27 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2008-11-28 23:45:27 +0000 |
commit | f86f1fe961f661a0c892bdd6de94007cc1466c01 (patch) | |
tree | f77250f688951ed90576078f9fd67f86f1dba07c /util/flashrom/flashrom.c | |
parent | f22ce41840ae966a6f465e90c8f05aed9ae5ef6b (diff) | |
download | coreboot-f86f1fe961f661a0c892bdd6de94007cc1466c01.tar.xz |
If a chip has any TEST_BAD_* flag set, we don't even list the
unsupported functions, giving the user the impression that the
unsupported functions are tested.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3780 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/flashrom.c')
-rw-r--r-- | util/flashrom/flashrom.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/util/flashrom/flashrom.c b/util/flashrom/flashrom.c index 9357d0480e..5e84134d31 100644 --- a/util/flashrom/flashrom.c +++ b/util/flashrom/flashrom.c @@ -499,15 +499,19 @@ int main(int argc, char *argv[]) if (flash->tested & TEST_BAD_WRITE) printf(" WRITE"); printf("\n"); - } else { + } + if ((!(flash->tested & TEST_BAD_PROBE) && !(flash->tested & TEST_OK_PROBE)) || + (!(flash->tested & TEST_BAD_READ) && !(flash->tested & TEST_OK_READ)) || + (!(flash->tested & TEST_BAD_ERASE) && !(flash->tested & TEST_OK_ERASE)) || + (!(flash->tested & TEST_BAD_WRITE) && !(flash->tested & TEST_OK_WRITE))) { printf("This flash part has status UNTESTED for operations:"); - if (!(flash->tested & TEST_OK_PROBE)) + if (!(flash->tested & TEST_BAD_PROBE) && !(flash->tested & TEST_OK_PROBE)) printf(" PROBE"); - if (!(flash->tested & TEST_OK_READ)) + if (!(flash->tested & TEST_BAD_READ) && !(flash->tested & TEST_OK_READ)) printf(" READ"); - if (!(flash->tested & TEST_OK_ERASE)) + if (!(flash->tested & TEST_BAD_ERASE) && !(flash->tested & TEST_OK_ERASE)) printf(" ERASE"); - if (!(flash->tested & TEST_OK_WRITE)) + if (!(flash->tested & TEST_BAD_WRITE) && !(flash->tested & TEST_OK_WRITE)) printf(" WRITE"); printf("\n"); } |