9
0
Fork 0

filetype: add BMP support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2012-09-12 15:42:43 +02:00 committed by Sascha Hauer
parent 09a1a28233
commit 2dfb4028b4
2 changed files with 4 additions and 0 deletions

View File

@ -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;
}

View File

@ -19,6 +19,7 @@ enum filetype {
filetype_sh,
filetype_mips_barebox,
filetype_fat,
filetype_bmp,
};
const char *file_type_to_string(enum filetype f);