1 --- a/drivers/mtd/redboot.c
2 +++ b/drivers/mtd/redboot.c
5 names += strlen(names)+1;
7 -#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
8 if(fl->next && fl->img->flash_base + fl->img->size + master->erasesize <= fl->next->img->flash_base) {
10 - parts[i].offset = parts[i-1].size + parts[i-1].offset;
11 - parts[i].size = fl->next->img->flash_base - parts[i].offset;
12 - parts[i].name = nullname;
14 + if (!strcmp(parts[i].name, "rootfs")) {
15 + parts[i].size = fl->next->img->flash_base;
16 + parts[i].size &= ~(master->erasesize - 1);
17 + parts[i].size -= parts[i].offset;
19 +#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
22 + parts[i].offset = parts[i-1].size + parts[i-1].offset;
23 + parts[i].size = fl->next->img->flash_base - parts[i].offset;
24 + parts[i].name = nullname;