9
0
Fork 0

filetype: add Binary PacKage BPK type

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 2013-10-03 12:01:52 +02:00 committed by Sascha Hauer
parent 453fe26ed7
commit 32d88d9a86
2 changed files with 4 additions and 0 deletions

View File

@ -50,6 +50,7 @@ static const struct filetype_str filetype_str[] = {
[filetype_png] = { "PNG image", "png" },
[filetype_ext] = { "ext filesystem", "ext" },
[filetype_gpt] = { "GUID Partition Table", "gpt" },
[filetype_bpk] = { "Binary PacKage", "bpk" },
};
const char *file_type_to_string(enum filetype f)
@ -220,6 +221,8 @@ enum filetype file_detect_type(const void *_buf, size_t bufsize)
return filetype_png;
if (is_barebox_mips_head(_buf))
return filetype_mips_barebox;
if (buf[0] == be32_to_cpu(0x534F4659))
return filetype_bpk;
if (bufsize < 64)
return filetype_unknown;

View File

@ -28,6 +28,7 @@ enum filetype {
filetype_ext,
filetype_gpt,
filetype_ubifs,
filetype_bpk,
filetype_max,
};