lua: Fixed some cross-platform issues for PPC (and probably other architectures)
[openwrt.git] / target / linux / generic-2.6 / patches-2.6.26 / 070-redboot_space.patch
1 --- a/drivers/mtd/redboot.c
2 +++ b/drivers/mtd/redboot.c
3 @@ -251,14 +251,21 @@
4 #endif
5 names += strlen(names)+1;
6
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) {
9 - i++;
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;
13 - }
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;
18 + }
19 +#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
20 + else {
21 + i++;
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;
25 + }
26 #endif
27 + }
28 tmp_fl = fl;
29 fl = fl->next;
30 kfree(tmp_fl);
This page took 0.04394 seconds and 5 git commands to generate.