mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
fix kernel oops in the redboot partition parser when CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is set and there is some free space after the rootfs partition
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11948 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -15,15 +15,15 @@
|
|||||||
+ parts[i].size = fl->next->img->flash_base;
|
+ parts[i].size = fl->next->img->flash_base;
|
||||||
+ parts[i].size &= ~(master->erasesize - 1);
|
+ parts[i].size &= ~(master->erasesize - 1);
|
||||||
+ parts[i].size -= parts[i].offset;
|
+ parts[i].size -= parts[i].offset;
|
||||||
+ }
|
|
||||||
+#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
|
+#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
|
||||||
+ else {
|
+ nrparts--;
|
||||||
|
+ } else {
|
||||||
+ i++;
|
+ i++;
|
||||||
+ parts[i].offset = parts[i-1].size + parts[i-1].offset;
|
+ parts[i].offset = parts[i-1].size + parts[i-1].offset;
|
||||||
+ parts[i].size = fl->next->img->flash_base - parts[i].offset;
|
+ parts[i].size = fl->next->img->flash_base - parts[i].offset;
|
||||||
+ parts[i].name = nullname;
|
+ parts[i].name = nullname;
|
||||||
+ }
|
|
||||||
#endif
|
#endif
|
||||||
|
+ }
|
||||||
+ }
|
+ }
|
||||||
tmp_fl = fl;
|
tmp_fl = fl;
|
||||||
fl = fl->next;
|
fl = fl->next;
|
||||||
|
|||||||
@@ -15,15 +15,15 @@
|
|||||||
+ parts[i].size = fl->next->img->flash_base;
|
+ parts[i].size = fl->next->img->flash_base;
|
||||||
+ parts[i].size &= ~(master->erasesize - 1);
|
+ parts[i].size &= ~(master->erasesize - 1);
|
||||||
+ parts[i].size -= parts[i].offset;
|
+ parts[i].size -= parts[i].offset;
|
||||||
+ }
|
|
||||||
+#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
|
+#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
|
||||||
+ else {
|
+ nrparts--;
|
||||||
|
+ } else {
|
||||||
+ i++;
|
+ i++;
|
||||||
+ parts[i].offset = parts[i-1].size + parts[i-1].offset;
|
+ parts[i].offset = parts[i-1].size + parts[i-1].offset;
|
||||||
+ parts[i].size = fl->next->img->flash_base - parts[i].offset;
|
+ parts[i].size = fl->next->img->flash_base - parts[i].offset;
|
||||||
+ parts[i].name = nullname;
|
+ parts[i].name = nullname;
|
||||||
+ }
|
|
||||||
#endif
|
#endif
|
||||||
|
+ }
|
||||||
+ }
|
+ }
|
||||||
tmp_fl = fl;
|
tmp_fl = fl;
|
||||||
fl = fl->next;
|
fl = fl->next;
|
||||||
|
|||||||
@@ -15,15 +15,15 @@
|
|||||||
+ parts[i].size = fl->next->img->flash_base;
|
+ parts[i].size = fl->next->img->flash_base;
|
||||||
+ parts[i].size &= ~(master->erasesize - 1);
|
+ parts[i].size &= ~(master->erasesize - 1);
|
||||||
+ parts[i].size -= parts[i].offset;
|
+ parts[i].size -= parts[i].offset;
|
||||||
+ }
|
|
||||||
+#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
|
+#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
|
||||||
+ else {
|
+ nrparts--;
|
||||||
|
+ } else {
|
||||||
+ i++;
|
+ i++;
|
||||||
+ parts[i].offset = parts[i-1].size + parts[i-1].offset;
|
+ parts[i].offset = parts[i-1].size + parts[i-1].offset;
|
||||||
+ parts[i].size = fl->next->img->flash_base - parts[i].offset;
|
+ parts[i].size = fl->next->img->flash_base - parts[i].offset;
|
||||||
+ parts[i].name = nullname;
|
+ parts[i].name = nullname;
|
||||||
+ }
|
|
||||||
#endif
|
#endif
|
||||||
|
+ }
|
||||||
+ }
|
+ }
|
||||||
tmp_fl = fl;
|
tmp_fl = fl;
|
||||||
fl = fl->next;
|
fl = fl->next;
|
||||||
|
|||||||
@@ -15,15 +15,15 @@
|
|||||||
+ parts[i].size = fl->next->img->flash_base;
|
+ parts[i].size = fl->next->img->flash_base;
|
||||||
+ parts[i].size &= ~(master->erasesize - 1);
|
+ parts[i].size &= ~(master->erasesize - 1);
|
||||||
+ parts[i].size -= parts[i].offset;
|
+ parts[i].size -= parts[i].offset;
|
||||||
+ }
|
|
||||||
+#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
|
+#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
|
||||||
+ else {
|
+ nrparts--;
|
||||||
|
+ } else {
|
||||||
+ i++;
|
+ i++;
|
||||||
+ parts[i].offset = parts[i-1].size + parts[i-1].offset;
|
+ parts[i].offset = parts[i-1].size + parts[i-1].offset;
|
||||||
+ parts[i].size = fl->next->img->flash_base - parts[i].offset;
|
+ parts[i].size = fl->next->img->flash_base - parts[i].offset;
|
||||||
+ parts[i].name = nullname;
|
+ parts[i].name = nullname;
|
||||||
+ }
|
|
||||||
#endif
|
#endif
|
||||||
|
+ }
|
||||||
+ }
|
+ }
|
||||||
tmp_fl = fl;
|
tmp_fl = fl;
|
||||||
fl = fl->next;
|
fl = fl->next;
|
||||||
|
|||||||
Reference in New Issue
Block a user