diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-10-07 07:59:18 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-10-07 07:59:18 +0200 |
commit | fb0c2ee1ae85b9f5127c37e604b92899a907082c (patch) | |
tree | b16d34690bb86e224136a0a0d0519fe74b3be887 /common | |
parent | e48331d6e2f37ed32dfaed1f28a36e8d796c4cea (diff) | |
parent | 2f677b9b1ed510612b72799ec6eb65a6c6a3c172 (diff) | |
download | barebox-fb0c2ee1ae85b9f5127c37e604b92899a907082c.tar.gz barebox-fb0c2ee1ae85b9f5127c37e604b92899a907082c.tar.xz |
Merge branch 'for-next/bpkfs'
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; |