From 2dfb4028b4eb4843a3dfcf87fd9608ac04bbf622 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Wed, 12 Sep 2012 15:42:43 +0200 Subject: filetype: add BMP support Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: Sascha Hauer --- common/filetype.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common/filetype.c') diff --git a/common/filetype.c b/common/filetype.c index e736d43efe..61fca5aaba 100644 --- a/common/filetype.c +++ b/common/filetype.c @@ -42,6 +42,7 @@ static const char *filetype_str[] = { [filetype_sh] = "Bourne Shell", [filetype_mips_barebox] = "MIPS barebox image", [filetype_fat] = "FAT filesytem", + [filetype_bmp] = "BMP image", }; const char *file_type_to_string(enum filetype f) @@ -101,6 +102,8 @@ enum filetype file_detect_type(void *_buf) return filetype_mips_barebox; if (is_fat(buf8)) return filetype_fat; + if (strncmp(buf8, "BM", 2) == 0) + return filetype_bmp; return filetype_unknown; } -- cgit v1.2.3