This allows mtdsplit parsers work with UBI which is very popular on
NAND flases.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 48599
#include "mtdsplit.h"
+#define UBI_EC_MAGIC 0x55424923 /* UBI# */
+
struct squashfs_super_block {
__le32 s_magic;
__le32 pad0[9];
if (type)
*type = MTDSPLIT_PART_TYPE_JFFS2;
return 0;
+ } else if (be32_to_cpu(magic) == UBI_EC_MAGIC) {
+ if (type)
+ *type = MTDSPLIT_PART_TYPE_UBI;
+ return 0;
}
return -EINVAL;
MTDSPLIT_PART_TYPE_UNK = 0,
MTDSPLIT_PART_TYPE_SQUASHFS,
MTDSPLIT_PART_TYPE_JFFS2,
+ MTDSPLIT_PART_TYPE_UBI,
};
#ifdef CONFIG_MTD_SPLIT