diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-07-24 16:06:15 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-08-07 08:44:48 +0200 |
commit | d9abbe8d0144b174b1934b570231fc756067c088 (patch) | |
tree | 1eb9a5ae3ccc6d1848b488e883509fc745bbf1cf | |
parent | 9576c342526094be3959b30242ebbad215ce7060 (diff) | |
download | barebox-d9abbe8d0144b174b1934b570231fc756067c088.tar.gz barebox-d9abbe8d0144b174b1934b570231fc756067c088.tar.xz |
filetype: Add ubifs detection
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | common/filetype.c | 2 | ||||
-rw-r--r-- | include/filetype.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/common/filetype.c b/common/filetype.c index 13c7994df5..7507d85de0 100644 --- a/common/filetype.c +++ b/common/filetype.c @@ -203,6 +203,8 @@ enum filetype file_detect_type(const void *_buf, size_t bufsize) return filetype_uimage; if (buf[0] == 0x23494255) return filetype_ubi; + if (buf[0] == le32_to_cpu(0x06101831)) + return filetype_ubifs; if (buf[0] == 0x20031985) return filetype_jffs2; if (buf8[0] == 0x1f && buf8[1] == 0x8b && buf8[2] == 0x08) diff --git a/include/filetype.h b/include/filetype.h index 1b90805993..9a864daddb 100644 --- a/include/filetype.h +++ b/include/filetype.h @@ -27,6 +27,7 @@ enum filetype { filetype_png, filetype_ext, filetype_gpt, + filetype_ubifs, filetype_max, }; |