summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-08-05 12:49:46 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-08-05 12:49:46 +0200
commitb1aae799f93634bc724c49268972457e0361a633 (patch)
tree0d5b5bfec46fada83f1c44426836d073d99f38f7 /common
parent5034e4eacc136f05747c0d1a2d9e9daef510af6b (diff)
parentd081e75b04311f29ae957c58a155b1f172df88a9 (diff)
downloadbarebox-b1aae799f93634bc724c49268972457e0361a633.tar.gz
barebox-b1aae799f93634bc724c49268972457e0361a633.tar.xz
Merge branch 'for-next/lz4'
Diffstat (limited to 'common')
-rw-r--r--common/filetype.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/filetype.c b/common/filetype.c
index 1ff3dd202a..13c7994df5 100644
--- a/common/filetype.c
+++ b/common/filetype.c
@@ -33,6 +33,7 @@ static const struct filetype_str filetype_str[] = {
[filetype_unknown] = { "unknown", "unkown" },
[filetype_arm_zimage] = { "arm Linux zImage", "arm-zimage" },
[filetype_lzo_compressed] = { "lzo compressed", "lzo" },
+ [filetype_lz4_compressed] = { "lz4 compressed", "lz4" },
[filetype_arm_barebox] = { "arm barebox image", "arm-barebox" },
[filetype_uimage] = { "U-Boot uImage", "u-boot" },
[filetype_ubi] = { "UBI image", "ubi" },
@@ -195,6 +196,9 @@ enum filetype file_detect_type(const void *_buf, size_t bufsize)
if (buf8[0] == 0x89 && buf8[1] == 0x4c && buf8[2] == 0x5a &&
buf8[3] == 0x4f)
return filetype_lzo_compressed;
+ if (buf8[0] == 0x02 && buf8[1] == 0x21 && buf8[2] == 0x4c &&
+ buf8[3] == 0x18)
+ return filetype_lz4_compressed;
if (buf[0] == be32_to_cpu(0x27051956))
return filetype_uimage;
if (buf[0] == 0x23494255)