Restrict the cyclecounter readout to those cases where

it has been explicitly requested (by -y or -Y), rather than always
attempting to read the last EEPROM bytes.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1014 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
joerg_wunsch 2011-09-15 15:20:59 +00:00
parent 8f807bd402
commit b71fb55405
2 changed files with 9 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2011-09-15 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
* main.c: Restrict the cyclecounter readout to those cases where
it has been explicitly requested (by -y or -Y), rather than always
attempting to read the last EEPROM bytes.
2011-09-15 Joerg Wunsch <j.gnu@uriah.heep.sax.de> 2011-09-15 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
* stk500v2.c (stk600_xprog_paged_load, stk600_xprog_paged_write): * stk500v2.c (stk600_xprog_paged_load, stk600_xprog_paged_write):

8
main.c
View File

@ -1005,8 +1005,7 @@ int main(int argc, char * argv [])
* *
* The cycle count will be displayed anytime it will be changed later. * The cycle count will be displayed anytime it will be changed later.
*/ */
if (init_ok && !(p->flags & AVRPART_AVR32) && if (init_ok && !(p->flags & AVRPART_AVR32) && do_cycles) {
(set_cycles == -1) && ((erase == 0) || (do_cycles == 0))) {
/* /*
* see if the cycle count in the last four bytes of eeprom seems * see if the cycle count in the last four bytes of eeprom seems
* reasonable * reasonable
@ -1015,9 +1014,8 @@ int main(int argc, char * argv [])
if (quell_progress < 2) { if (quell_progress < 2) {
if ((rc >= 0) && (cycles != 0)) { if ((rc >= 0) && (cycles != 0)) {
fprintf(stderr, fprintf(stderr,
"%s: current erase-rewrite cycle count is %d%s\n", "%s: current erase-rewrite cycle count is %d\n",
progname, cycles, progname, cycles);
do_cycles ? "" : " (if being tracked)");
} }
} }
} }