diff --git a/ChangeLog b/ChangeLog index b466efa2..803467f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-09-13 Joerg Wunsch + + * stk500v2.c (stk500v2_command): Treat warnings as errors rather than + success. + 2011-08-30 Joerg Wunsch bug #34027: avrdude AT90S1200 Problem (part 3 - documentation) diff --git a/stk500v2.c b/stk500v2.c index 2fd5e944..5fde88a1 100644 --- a/stk500v2.c +++ b/stk500v2.c @@ -787,18 +787,20 @@ retry: msg = msgbuf; break; } - if (quell_progress < 2) + if (quell_progress < 2) { fprintf(stderr, "%s: stk500v2_command(): warning: %s\n", progname, msg); - buf[1] = STATUS_CMD_OK; /* pretend success */ - } - if (buf[1] == STATUS_CMD_OK) + } + } else if (buf[1] == STATUS_CMD_OK) { return status; - if (buf[1] == STATUS_CMD_FAILED) - fprintf(stderr, "%s: stk500v2_command(): command failed\n", progname); - else + } else if (buf[1] == STATUS_CMD_FAILED) { + fprintf(stderr, + "%s: stk500v2_command(): command failed\n", + progname); + } else { fprintf(stderr, "%s: stk500v2_command(): unknown status 0x%02x\n", progname, buf[1]); + } return -1; } }