From 34cc6cc070b671da0a0f7de6c36fd7941e3ce2f9 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Sun, 28 Jun 2009 10:57:58 +0000 Subject: Handle programmer init errors and abort If the programmer didn't initialize correctly, it is pointless to continue. Fix standalone IT87* SPI init to set flashbus to NONE if no IT87* SPI communication is possible. Print the I/O port detected by the IT87* SPI code. Corresponding to flashrom svn r633. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Ward Vandewege --- flashrom.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'flashrom.c') diff --git a/flashrom.c b/flashrom.c index 7bc9b71..5791372 100644 --- a/flashrom.c +++ b/flashrom.c @@ -692,7 +692,10 @@ int main(int argc, char *argv[]) if (optind < argc) filename = argv[optind++]; - ret = programmer_init(); + if (programmer_init()) { + fprintf(stderr, "Error: Programmer initialization failed.\n"); + exit(1); + } myusec_calibrate_delay(); -- cgit v1.1