X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/95ef6e1d42c87710ededc921e4ae1175381ddf9d..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 5158266d2..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; @@ -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