X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/8b102012a035b522000ce7e76e12f9285630e3ff..e1527acc5f30fab2663eb51cb70a8da696e062da:/target/linux/generic/patches-2.6.38/400-rootfs_split.patch diff --git a/target/linux/generic/patches-2.6.38/400-rootfs_split.patch b/target/linux/generic/patches-2.6.38/400-rootfs_split.patch index 9d04b7ca4..9b7c2dc0b 100644 --- a/target/linux/generic/patches-2.6.38/400-rootfs_split.patch +++ b/target/linux/generic/patches-2.6.38/400-rootfs_split.patch @@ -111,8 +111,8 @@ + } + + memcpy(dpart, part, sizeof(*part)); ++ strcpy((char *)&dpart[1], ROOTFS_SPLIT_NAME); + dpart->name = (unsigned char *)&dpart[1]; -+ strcpy(dpart->name, ROOTFS_SPLIT_NAME); + + dpart->size = rpart->size - (split_offset - spart->offset); + dpart->offset = split_offset; @@ -193,7 +193,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 -@@ -652,6 +801,9 @@ int add_mtd_partitions(struct mtd_info * +@@ -652,6 +803,9 @@ int add_mtd_partitions(struct mtd_info * struct mtd_part *slave; uint64_t cur_offset = 0; int i; @@ -203,7 +203,7 @@ printk(KERN_NOTICE "Creating %d MTD partitions on \"%s\":\n", nbparts, master->name); -@@ -666,6 +818,21 @@ int add_mtd_partitions(struct mtd_info * +@@ -666,6 +820,21 @@ int add_mtd_partitions(struct mtd_info * add_mtd_device(&slave->mtd); @@ -225,7 +225,7 @@ cur_offset = slave->offset + slave->mtd.size; } -@@ -673,6 +840,32 @@ int add_mtd_partitions(struct mtd_info * +@@ -673,6 +842,32 @@ int add_mtd_partitions(struct mtd_info * } EXPORT_SYMBOL(add_mtd_partitions); @@ -260,10 +260,10 @@ --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c -@@ -841,6 +841,13 @@ static int mtd_ioctl(struct file *file, - file->f_pos = 0; +@@ -956,6 +956,13 @@ static int mtd_ioctl(struct file *file, break; } + #endif +#ifdef CONFIG_MTD_PARTITIONS + case MTDREFRESH: + { @@ -272,8 +272,8 @@ + } +#endif - case OTPGETREGIONCOUNT: - case OTPGETREGIONINFO: + default: + ret = -ENOTTY; --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -125,6 +125,7 @@ struct nand_ecclayout { @@ -302,7 +302,8 @@ +struct mtd_partition; struct mtd_partition { - char *name; /* identifier string */ +- char *name; /* identifier string */ ++ const char *name; /* identifier string */ uint64_t size; /* partition size */ uint64_t offset; /* offset within the master MTD space */ uint32_t mask_flags; /* master MTD flags to mask out for this partition */ @@ -325,7 +326,7 @@ #define MEMWRITEOOB64 _IOWR('M', 21, struct mtd_oob_buf64) #define MEMREADOOB64 _IOWR('M', 22, struct mtd_oob_buf64) #define MEMISLOCKED _IOR('M', 23, struct erase_info_user) -+#define MTDREFRESH _IO('M', 23) ++#define MTDREFRESH _IO('M', 50) /* * Obsolete legacy interface. Keep it in order not to break userspace