diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-07-24 12:18:54 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-07-24 12:18:54 +0000 |
commit | b4d60583393a012100ba9d00b6e9bf1c792d1ed1 (patch) | |
tree | 8900da78fef5b193830de8a43ef713da4613990c /flashrom.c | |
parent | 4a469a239ec45802f4d67f7acf14045b514d8c98 (diff) | |
download | flashrom-b4d60583393a012100ba9d00b6e9bf1c792d1ed1.zip flashrom-b4d60583393a012100ba9d00b6e9bf1c792d1ed1.tar.gz |
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>
Diffstat (limited to 'flashrom.c')
-rw-r--r-- | flashrom.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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(); |