#define ROOTFS_SPLIT_NAME "rootfs_data"
+enum mtdsplit_part_type {
+ MTDSPLIT_PART_TYPE_UNK = 0,
+ MTDSPLIT_PART_TYPE_SQUASHFS,
+ MTDSPLIT_PART_TYPE_JFFS2,
+ MTDSPLIT_PART_TYPE_UBI,
+};
+
#ifdef CONFIG_MTD_SPLIT
int mtd_get_squashfs_len(struct mtd_info *master,
size_t offset,
size_t *squashfs_len);
-int mtd_check_rootfs_magic(struct mtd_info *mtd, size_t offset);
+int mtd_check_rootfs_magic(struct mtd_info *mtd, size_t offset,
+ enum mtdsplit_part_type *type);
int mtd_find_rootfs_from(struct mtd_info *mtd,
size_t from,
size_t limit,
- size_t *ret_offset);
+ size_t *ret_offset,
+ enum mtdsplit_part_type *type);
#else
static inline int mtd_get_squashfs_len(struct mtd_info *master,
return -ENODEV;
}
-static inline int mtd_check_rootfs_magic(struct mtd_info *mtd, size_t offset)
+static inline int mtd_check_rootfs_magic(struct mtd_info *mtd, size_t offset,
+ enum mtdsplit_part_type *type)
{
return -EINVAL;
}
static inline int mtd_find_rootfs_from(struct mtd_info *mtd,
size_t from,
size_t limit,
- size_t *ret_offset)
+ size_t *ret_offset,
+ enum mtdsplit_part_type *type)
{
return -ENODEV;
}