mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/8] filetype: Add ubifs detection
Date: Tue,  6 Aug 2013 15:07:03 +0200	[thread overview]
Message-ID: <1375794428-29577-4-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1375794428-29577-1-git-send-email-s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 common/filetype.c  | 2 ++
 include/filetype.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/common/filetype.c b/common/filetype.c
index 13c7994..7507d85 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 1b90805..9a864da 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,
 };
 
-- 
1.8.4.rc1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2013-08-06 13:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-06 13:07 [PATCH] UBIFS support Sascha Hauer
2013-08-06 13:07 ` [PATCH 1/8] mtd: ubi: add missing prototype for ubi_volume_notify Sascha Hauer
2013-08-06 13:07 ` [PATCH 2/8] mtd: ubi: add ubi info functions Sascha Hauer
2013-08-06 13:07 ` Sascha Hauer [this message]
2013-08-06 13:07 ` [PATCH 4/8] mtd: ubi: Add support for opening a volume by cdev Sascha Hauer
2013-08-06 13:07 ` [PATCH 5/8] move print_hex_dump function to include/common.h Sascha Hauer
2013-08-06 13:07 ` [PATCH 6/8] extend barebox wrapper header Sascha Hauer
2013-08-06 13:07 ` [PATCH 7/8] Add deflate_decompress function Sascha Hauer
2013-08-06 13:07 ` [PATCH 8/8] fs: Add ubifs support Sascha Hauer
2013-08-06 18:16   ` Alexander Aring
2013-08-06 19:50     ` Sascha Hauer
2013-08-06 23:50       ` Alexander Aring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1375794428-29577-4-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox