diff loadtools/flerase.c @ 205:cd12d1049f91

fc-loadtool: flash ID check moved into flash info, added to erase and program
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 23 Dec 2013 18:40:04 +0000
parents 6fb41cfa773d
children f027c6fbe37e
line wrap: on
line diff
--- a/loadtools/flerase.c	Mon Dec 23 08:49:38 2013 +0000
+++ b/loadtools/flerase.c	Mon Dec 23 18:40:04 2013 +0000
@@ -97,6 +97,9 @@
 		return(-1);
 	if (get_flash_sector_range(bi, offset, len, &startsec, &endsec) < 0)
 		return(-1);
+	stat = flash_id_check(bank, 0);
+	if (stat)
+		return(stat);
 	printf("Erasing %d sector(s)\n", endsec - startsec);
 	for (sp = startsec; sp < endsec; sp++) {
 		stat = do_sector_erase(bi, sp);