From 0809303feb496db9b9266f9f57bdd20a629a5347 Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Sat, 11 Aug 2012 17:16:09 +0200 Subject: image: Detect ROMFS file as initfs --- src/image.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/image.c b/src/image.c index 42af655..069bc17 100644 --- a/src/image.c +++ b/src/image.c @@ -443,6 +443,8 @@ enum image_type image_type_from_data(struct image * image) { return IMAGE_CMT_ALGO; else if ( memcmp(buf, "\xb2\x00\x00\x01\x44\x00\x00\x00", 8) == 0 ) return IMAGE_CMT_MCUSW; + else if ( memcmp(buf, "\x45\x3d\xcd\x28", 2) == 0 ) /* Compressed ROMFS header */ + return IMAGE_INITFS; else if ( memcmp(buf, "\x85\x19\x01\xe0", 2) == 0 ) { /* JFFS2 MAGIC */ if ( image->size < 0x300000 ) return IMAGE_INITFS; -- cgit v1.2.3