From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from 20.mo5.mail-out.ovh.net ([91.121.55.239] helo=mo5.mail-out.ovh.net) by casper.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TBnJr-0008H7-Th for barebox@lists.infradead.org; Wed, 12 Sep 2012 13:49:34 +0000 Received: from mail404.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo5.mail-out.ovh.net (Postfix) with SMTP id E0828FF9D64 for ; Wed, 12 Sep 2012 15:51:03 +0200 (CEST) From: Jean-Christophe PLAGNIOL-VILLARD Date: Wed, 12 Sep 2012 15:42:43 +0200 Message-Id: <1347457369-9215-5-git-send-email-plagnioj@jcrosoft.com> In-Reply-To: <1347457369-9215-1-git-send-email-plagnioj@jcrosoft.com> References: <20120912132443.GQ31207@game.jcrosoft.org> <1347457369-9215-1-git-send-email-plagnioj@jcrosoft.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 05/11] filetype: add BMP support To: barebox@lists.infradead.org Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- common/filetype.c | 2 ++ include/filetype.h | 1 + 2 files changed, 3 insertions(+) diff --git a/common/filetype.c b/common/filetype.c index e736d43..5710394 100644 --- a/common/filetype.c +++ b/common/filetype.c @@ -101,6 +101,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; } diff --git a/include/filetype.h b/include/filetype.h index 179ec0f..6c97159 100644 --- a/include/filetype.h +++ b/include/filetype.h @@ -19,6 +19,7 @@ enum filetype { filetype_sh, filetype_mips_barebox, filetype_fat, + filetype_bmp, }; const char *file_type_to_string(enum filetype f); -- 1.7.10.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox