aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandros C. Couloumbis <alex@ozo.com>2010-11-05 17:41:13 +0000
committerAlexandros C. Couloumbis <alex@ozo.com>2010-11-05 17:41:13 +0000
commitdc2d7fca2023c5ba439d72850c8f5fc764920867 (patch)
treee7fb634745ddddf582d1a5df589724801b569b7b
parent07439331cbc84a3dedc570c825d6b9ff579b77dd (diff)
downloadupstream-dc2d7fca2023c5ba439d72850c8f5fc764920867.tar.gz
upstream-dc2d7fca2023c5ba439d72850c8f5fc764920867.tar.bz2
upstream-dc2d7fca2023c5ba439d72850c8f5fc764920867.zip
target/linux: fix a wrong 2.6.37 patch (thank you acinonyx)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23889 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/generic/patches-2.6.37/065-rootfs_split.patch42
1 files changed, 25 insertions, 17 deletions
diff --git a/target/linux/generic/patches-2.6.37/065-rootfs_split.patch b/target/linux/generic/patches-2.6.37/065-rootfs_split.patch
index 63c545412e..532cf3ae59 100644
--- a/target/linux/generic/patches-2.6.37/065-rootfs_split.patch
+++ b/target/linux/generic/patches-2.6.37/065-rootfs_split.patch
@@ -37,7 +37,7 @@
/*
* MTD methods which simply translate the effective address and pass through
-@@ -618,6 +620,164 @@ int mtd_del_partition(struct mtd_info *m
+@@ -618,6 +620,150 @@ int mtd_del_partition(struct mtd_info *m
}
EXPORT_SYMBOL_GPL(mtd_del_partition);
@@ -127,20 +127,6 @@
+ kfree(dpart);
+ return -ENOMEM;
+ }
-+ if (!strcmp(parts[i].name, "rootfs")) {
-+#ifdef CONFIG_MTD_ROOTFS_ROOT_DEV
-+ if (ROOT_DEV == 0) {
-+ printk(KERN_NOTICE "mtd: partition \"rootfs\" "
-+ "set to be root filesystem\n");
-+ ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, slave->mtd.index);
-+ }
-+#endif
-+#ifdef CONFIG_MTD_ROOTFS_SPLIT
-+ ret = split_rootfs_data(master, &slave->mtd, &parts[i]);
-+ /* if (ret == 0)
-+ * j++; */
-+#endif
-+ }
+ rpart->split = &slave->mtd;
+
+ return 0;
@@ -202,7 +188,7 @@
/*
* This function, given a master MTD object and a partition table, creates
* and registers slave MTD objects which are bound to the master according to
-@@ -633,7 +793,7 @@ int add_mtd_partitions(struct mtd_info *
+@@ -633,7 +779,7 @@ int add_mtd_partitions(struct mtd_info *
{
struct mtd_part *slave;
uint64_t cur_offset = 0;
@@ -211,7 +197,29 @@
printk(KERN_NOTICE "Creating %d MTD partitions on \"%s\":\n", nbparts, master->name);
-@@ -655,6 +815,32 @@ int add_mtd_partitions(struct mtd_info *
+@@ -648,6 +794,21 @@ int add_mtd_partitions(struct mtd_info *
+
+ add_mtd_device(&slave->mtd);
+
++ if (!strcmp(parts[i].name, "rootfs")) {
++#ifdef CONFIG_MTD_ROOTFS_ROOT_DEV
++ if (ROOT_DEV == 0) {
++ printk(KERN_NOTICE "mtd: partition \"rootfs\" "
++ "set to be root filesystem\n");
++ ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, slave->mtd.index);
++ }
++#endif
++#ifdef CONFIG_MTD_ROOTFS_SPLIT
++ ret = split_rootfs_data(master, &slave->mtd, &parts[i]);
++ /* if (ret == 0)
++ * j++; */
++#endif
++ }
++
+ cur_offset = slave->offset + slave->mtd.size;
+ }
+
+@@ -655,6 +816,32 @@ int add_mtd_partitions(struct mtd_info *
}
EXPORT_SYMBOL(add_mtd_partitions);