9
0
Fork 0

filetype: add Android boot image support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2012-04-11 09:25:24 +02:00 committed by Sascha Hauer
parent 6c727af2c2
commit f3d1525337
2 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,7 @@ static const char *filetype_str[] = {
[filetype_gzip] = "gzip compressed",
[filetype_bzip2] = "bzip2 compressed",
[filetype_oftree] = "open firmware flat device tree",
[filetype_aimage] = "Android boot image",
};
const char *file_type_to_string(enum filetype f)
@ -72,6 +73,8 @@ enum filetype file_detect_type(void *_buf)
return filetype_bzip2;
if (buf[0] == be32_to_cpu(0xd00dfeed))
return filetype_oftree;
if (strncmp(buf8, "ANDROID!", 8) == 0)
return filetype_aimage;
return filetype_unknown;
}

View File

@ -15,6 +15,7 @@ enum filetype {
filetype_gzip,
filetype_bzip2,
filetype_oftree,
filetype_aimage,
};
const char *file_type_to_string(enum filetype f);