summaryrefslogtreecommitdiffstats
path: root/common/filetype.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-08-07 06:14:56 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-08-07 06:14:56 +0200
commit8a11a59b379b641423a6ed655aae36ec00404403 (patch)
treea10f059d0bdcf9ba043cef744d605f9260991b18 /common/filetype.c
parente3ff4dfa41b4e8afc26b69e5c3d8c127f0f37c39 (diff)
parent9183a8c683014f7f6dae004009556c9c0d4d2a15 (diff)
downloadbarebox-8a11a59b379b641423a6ed655aae36ec00404403.tar.gz
Merge branch 'for-next/efi'
Conflicts: .gitignore Makefile drivers/serial/Makefile
Diffstat (limited to 'common/filetype.c')
-rw-r--r--common/filetype.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/filetype.c b/common/filetype.c
index 86e544a..c8f3582 100644
--- a/common/filetype.c
+++ b/common/filetype.c
@@ -57,6 +57,7 @@ static const struct filetype_str filetype_str[] = {
[filetype_ch_image] = { "TI OMAP CH boot image", "ch-image" },
[filetype_ch_image_be] = {
"TI OMAP CH boot image (big endian)", "ch-image-be" },
+ [filetype_exe] = { "MS-DOS executable", "exe" },
};
const char *file_type_to_string(enum filetype f)
@@ -237,6 +238,9 @@ enum filetype file_detect_type(const void *_buf, size_t bufsize)
if (bufsize < 64)
return filetype_unknown;
+ if (buf8[0] == 'M' && buf8[1] == 'Z')
+ return filetype_exe;
+
if (is_barebox_arm_head(_buf))
return filetype_arm_barebox;
if (buf[9] == 0x016f2818 || buf[9] == 0x18286f01)