diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2012-08-11 17:16:09 +0200 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2012-08-11 17:16:09 +0200 |
commit | 0809303feb496db9b9266f9f57bdd20a629a5347 (patch) | |
tree | e829c2567b185d463869cc8a21694688b69b8a9e /src/image.c | |
parent | 33d00aa71438ca95c7a9175ceea520a696e5f68a (diff) | |
download | 0xFFFF-0809303feb496db9b9266f9f57bdd20a629a5347.tar.bz2 |
image: Detect ROMFS file as initfs
Diffstat (limited to 'src/image.c')
-rw-r--r-- | src/image.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |