aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-06-23 17:59:23 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-06-23 17:59:23 +0000
commit7158bfb110130fc7adbdd2d48acae558a130f480 (patch)
tree8fc8674a783a1391fce2d1d47c6f973fe07fd273
parent2fc5aae018be96666d27d1a804b7b80918f217a9 (diff)
downloadupstream-7158bfb110130fc7adbdd2d48acae558a130f480.tar.gz
upstream-7158bfb110130fc7adbdd2d48acae558a130f480.tar.bz2
upstream-7158bfb110130fc7adbdd2d48acae558a130f480.zip
fix partition align
SVN-Revision: 4059
-rw-r--r--openwrt/target/linux/brcm-2.4/patches/004-flash.patch8
1 files changed, 5 insertions, 3 deletions
diff --git a/openwrt/target/linux/brcm-2.4/patches/004-flash.patch b/openwrt/target/linux/brcm-2.4/patches/004-flash.patch
index 7a070128ed..14ba3b15f4 100644
--- a/openwrt/target/linux/brcm-2.4/patches/004-flash.patch
+++ b/openwrt/target/linux/brcm-2.4/patches/004-flash.patch
@@ -334,7 +334,7 @@ diff -urN linux.old/drivers/mtd/devices/sflash.c linux.dev/drivers/mtd/devices/s
diff -urN linux.old/drivers/mtd/maps/bcm947xx-flash.c linux.dev/drivers/mtd/maps/bcm947xx-flash.c
--- linux.old/drivers/mtd/maps/bcm947xx-flash.c 1970-01-01 01:00:00.000000000 +0100
+++ linux.dev/drivers/mtd/maps/bcm947xx-flash.c 2006-06-23 18:08:46.000000000 +0200
-@@ -0,0 +1,545 @@
+@@ -0,0 +1,547 @@
+/*
+ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
+ * Copyright (C) 2005 Waldemar Brodkorb <wbx@openwrt.org>
@@ -664,8 +664,10 @@ diff -urN linux.old/drivers/mtd/maps/bcm947xx-flash.c linux.dev/drivers/mtd/maps
+
+ /* Update the squashfs partition size based on the superblock info */
+ part->size = sb->bytes_used;
-+ part->size += (mtd->erasesize - 1);
-+ part->size &= ~(mtd->erasesize - 1);
++ len = part->offset + part->size;
++ len += (mtd->erasesize - 1);
++ len &= ~(mtd->erasesize - 1);
++ part->size = len - part->offset;
+ } else if (*((__u16 *) buf) == JFFS2_MAGIC_BITMASK) {
+ printk(KERN_INFO "%s: Filesystem type: jffs2\n", mtd->name);
+