[kernel] fix mtd warnings
[openwrt/svn-archive/archive.git] / target / linux / generic / patches-2.6.38 / 400-rootfs_split.patch
index 5158266d2b4c226965a53f3f800467ab1d333d89..cabaab4b2b23dccfbfc0ca80aab2cb8768655ae7 100644 (file)
 +      }
 +
 +      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;
  
 +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 */