From 642d1527482d28d7e4479e1afed1fc83a1acd065 Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Thu, 15 Sep 2011 15:20:59 +0000 Subject: [PATCH] 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 --- ChangeLog | 6 ++++++ main.c | 8 +++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8ff761bc..02e131a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-09-15 Joerg Wunsch + + * 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 * stk500v2.c (stk600_xprog_paged_load, stk600_xprog_paged_write): diff --git a/main.c b/main.c index 5de2bd25..80bae00c 100644 --- a/main.c +++ b/main.c @@ -1005,8 +1005,7 @@ int main(int argc, char * argv []) * * The cycle count will be displayed anytime it will be changed later. */ - if (init_ok && !(p->flags & AVRPART_AVR32) && - (set_cycles == -1) && ((erase == 0) || (do_cycles == 0))) { + if (init_ok && !(p->flags & AVRPART_AVR32) && do_cycles) { /* * see if the cycle count in the last four bytes of eeprom seems * reasonable @@ -1015,9 +1014,8 @@ int main(int argc, char * argv []) if (quell_progress < 2) { if ((rc >= 0) && (cycles != 0)) { fprintf(stderr, - "%s: current erase-rewrite cycle count is %d%s\n", - progname, cycles, - do_cycles ? "" : " (if being tracked)"); + "%s: current erase-rewrite cycle count is %d\n", + progname, cycles); } } }