mtd/drivers/mtd redboot.c,1.11,1.12

David Woodhouse dwmw2 at infradead.org
Wed Jun 25 12:08:13 EDT 2003


Update of /home/cvs/mtd/drivers/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv24546

Modified Files:
	redboot.c 
Log Message:
Fix off-by-one error which prevents a single eraseblock from being
registered as 'unallocated space'


Index: redboot.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/redboot.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- redboot.c	21 May 2003 10:39:26 -0000	1.11
+++ redboot.c	25 Jun 2003 16:08:10 -0000	1.12
@@ -148,7 +148,7 @@
 		strcpy(names, fl->img->name);
 		names += strlen(names)+1;
 
-		if(fl->next && fl->img->flash_base + fl->img->size + master->erasesize < fl->next->img->flash_base) {
+		if(fl->next && fl->img->flash_base + fl->img->size + master->erasesize <= fl->next->img->flash_base) {
 			i++;
 			parts[i].offset = parts[i-1].size + parts[i-1].offset;
 			parts[i].size = fl->next->img->flash_base - parts[i].offset;




More information about the linux-mtd-cvs mailing list