diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2013-10-03 12:01:52 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-10-06 13:26:51 +0200 |
commit | 32d88d9a86f947de0253334e2822219457adfc7c (patch) | |
tree | 3e0c88dacebce377f5560acd9178bee85c6c29ae /common | |
parent | 453fe26ed700bcdd769d6abc137fd79c8c85195a (diff) | |
download | barebox-32d88d9a86f947de0253334e2822219457adfc7c.tar.gz barebox-32d88d9a86f947de0253334e2822219457adfc7c.tar.xz |
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>
Diffstat (limited to 'common')
-rw-r--r-- | common/filetype.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/filetype.c b/common/filetype.c index 7507d85de0..8cdf82741a 100644 --- a/common/filetype.c +++ b/common/filetype.c @@ -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; |