diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-02-18 12:59:21 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-02-18 12:59:21 +0100 |
commit | cee0da03d33af0f1c0cf00b090db1890746eac80 (patch) | |
tree | 99640b6647698a48c9ef754413415eca111ff706 /common | |
parent | 37fddd1ae02aac9f10eacd16bbd6142198ed7342 (diff) | |
parent | 53c80f2365209823fd833253aac5ca69309f36af (diff) | |
download | barebox-cee0da03d33af0f1c0cf00b090db1890746eac80.tar.gz barebox-cee0da03d33af0f1c0cf00b090db1890746eac80.tar.xz |
Merge branch 'for-next/qoi'
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 2039134516..53517da70d 100644 --- a/common/filetype.c +++ b/common/filetype.c @@ -45,6 +45,7 @@ static const struct filetype_str filetype_str[] = { [filetype_mbr] = { "MBR sector", "mbr" }, [filetype_bmp] = { "BMP image", "bmp" }, [filetype_png] = { "PNG image", "png" }, + [filetype_qoi] = { "QOI image", "qoi" }, [filetype_ext] = { "EXT filesystem", "ext" }, [filetype_gpt] = { "GUID Partition Table", "gpt" }, [filetype_ubifs] = { "UBIFS image", "ubifs" }, @@ -300,6 +301,8 @@ enum filetype file_detect_type(const void *_buf, size_t bufsize) return filetype_aimage; if (buf64[0] == le64_to_cpu(0x0a1a0a0d474e5089ull)) return filetype_png; + if (strncmp(buf8, "qoif", 4) == 0) + return filetype_qoi; if (is_barebox_mips_head(_buf)) return filetype_mips_barebox; if (buf[0] == be32_to_cpu(0x534F4659)) |