Actually return the number of bytes read or written in avr_read() or

avr_write(), respectively, in case the paged_load()/paged_write()
methods succeeded, rather than only 0.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@696 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2006-12-11 14:06:52 +00:00
parent 76e7613841
commit 24990aff9c
1 changed files with 3 additions and 3 deletions

6
avr.c
View File

@ -187,7 +187,7 @@ int avr_read(PROGRAMMER * pgm, AVRPART * p, char * memtype, int size,
if (strcasecmp(mem->desc, "flash") == 0)
return avr_mem_hiaddr(mem);
else
return 0;
return rc;
}
}
}
@ -579,8 +579,8 @@ int avr_write(PROGRAMMER * pgm, AVRPART * p, char * memtype, int size,
* efficiently than we can read it directly, so use its routine
* instead
*/
if (pgm->paged_write(pgm, p, m, m->page_size, size) >= 0)
return 0;
if ((i = pgm->paged_write(pgm, p, m, m->page_size, size)) >= 0)
return i;
}
}