mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-29 07:53:44 +02:00
If writing failed, verifying is pointless
Abort instead. Corresponding to flashrom svn r666. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Oliver Niesner <oli@rhce.servebbs.net>
This commit is contained in:
parent
21eedec3a6
commit
0a3e5aeaf6
11
flashrom.c
11
flashrom.c
@ -851,12 +851,17 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr, "Error: flashrom has no write function for this flash chip.\n");
|
||||
return 1;
|
||||
}
|
||||
ret |= flash->write(flash, buf);
|
||||
if (!ret) printf("COMPLETE.\n");
|
||||
ret = flash->write(flash, buf);
|
||||
if (ret) {
|
||||
fprintf(stderr, "FAILED!\n");
|
||||
return 1;
|
||||
} else {
|
||||
printf("COMPLETE.\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (verify_it)
|
||||
ret |= verify_flash(flash, buf);
|
||||
ret = verify_flash(flash, buf);
|
||||
|
||||
programmer_shutdown();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user