diff --git a/common/filetype.c b/common/filetype.c index 7507d85..8cdf827 100644 --- a/common/filetype.c +++ b/common/filetype.c @@ -50,6 +50,7 @@ [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 @@ 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; diff --git a/include/filetype.h b/include/filetype.h index 9a864da..ffefe1c 100644 --- a/include/filetype.h +++ b/include/filetype.h @@ -28,6 +28,7 @@ filetype_ext, filetype_gpt, filetype_ubifs, + filetype_bpk, filetype_max, };