From 1748c5701f77ab7164ab3311f37abc356d825ccb Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Tue, 13 Jul 2010 23:56:13 +0000 Subject: 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 Acked-by: Stephen Kou --- cli_classic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli_classic.c') diff --git a/cli_classic.c b/cli_classic.c index 8279cc2b1..a81a5a722 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(); -- cgit v1.2.3