[kernel] netfilter: fix compiler warnings in xt_layer7
[openwrt/svn-archive/archive.git] / target / linux / generic-2.6 / patches-2.6.23 / 070-redboot_space.patch
1 Index: linux-2.6.23.1/drivers/mtd/redboot.c
2 ===================================================================
3 --- linux-2.6.23.1.orig/drivers/mtd/redboot.c 2008-01-26 01:43:10.742362738 +0100
4 +++ linux-2.6.23.1/drivers/mtd/redboot.c 2008-01-26 01:47:24.432819736 +0100
5 @@ -236,14 +236,21 @@
6 #endif
7 names += strlen(names)+1;
8
9 -#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
10 if(fl->next && fl->img->flash_base + fl->img->size + master->erasesize <= fl->next->img->flash_base) {
11 - i++;
12 - parts[i].offset = parts[i-1].size + parts[i-1].offset;
13 - parts[i].size = fl->next->img->flash_base - parts[i].offset;
14 - parts[i].name = nullname;
15 - }
16 + if (!strcmp(parts[i].name, "rootfs")) {
17 + parts[i].size = fl->next->img->flash_base;
18 + parts[i].size &= ~(master->erasesize - 1);
19 + parts[i].size -= parts[i].offset;
20 + }
21 +#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
22 + else {
23 + i++;
24 + parts[i].offset = parts[i-1].size + parts[i-1].offset;
25 + parts[i].size = fl->next->img->flash_base - parts[i].offset;
26 + parts[i].name = nullname;
27 + }
28 #endif
29 + }
30 tmp_fl = fl;
31 fl = fl->next;
32 kfree(tmp_fl);