diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2010-07-13 23:56:13 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2010-07-13 23:56:13 +0000 |
commit | 61bff423a1c1ad865d3042ea511186f1df486501 (patch) | |
tree | 5293ae58a44e75e42fb55619094e31f3f2b263e3 /cli_classic.c | |
parent | f9ceeece917d7bfba3d1d9eb9d38fb05d0198a41 (diff) | |
download | flashrom-61bff423a1c1ad865d3042ea511186f1df486501.zip flashrom-61bff423a1c1ad865d3042ea511186f1df486501.tar.gz |
Print an error message on read errors and abort instead of proceeding anyway
Improve error checking in file write, chip read and chip verify. Refactor the
read routines a bit to split reading from file writing. Log for a failed read:
[...] Found chip "Winbond W25x16" (2048 KB, SPI) at physical address
0xffe00000. Reading flash... Invalid OPCODE 0x03 Read operation failed! FAILED.
Corresponding to flashrom svn r1079.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stephen Kou <stephen@hyarros.com>
Diffstat (limited to 'cli_classic.c')
-rw-r--r-- | cli_classic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli_classic.c b/cli_classic.c index 8279cc2..a81a5a7 100644 --- a/cli_classic.c +++ b/cli_classic.c @@ -417,7 +417,7 @@ int cli_classic(int argc, char *argv[]) exit(1); } printf("Please note that forced reads most likely contain garbage.\n"); - return read_flash(flashes[0], filename); + return read_flash_to_file(flashes[0], filename); } // FIXME: flash writes stay enabled! programmer_shutdown(); |