From patchwork Tue Dec 4 13:04:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Genoud X-Patchwork-Id: 203616 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id BEC222C008F for ; Wed, 5 Dec 2012 00:04:30 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3EDD24A0B6; Tue, 4 Dec 2012 14:04:29 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gVNnO7rbN9wN; Tue, 4 Dec 2012 14:04:29 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 34A694A0B7; Tue, 4 Dec 2012 14:04:24 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DCAB04A0B7 for ; Tue, 4 Dec 2012 14:04:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FU6IVDtXrlYP for ; Tue, 4 Dec 2012 14:04:20 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by theia.denx.de (Postfix) with ESMTPS id 424474A0B6 for ; Tue, 4 Dec 2012 14:04:18 +0100 (CET) Received: by mail-wg0-f54.google.com with SMTP id fg15so2195422wgb.9 for ; Tue, 04 Dec 2012 05:04:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=lmdez+tydzGONtPT+6RpnInJCLa2M6TezA/mtkiqkwU=; b=MoOVuD0JYUCk9VEWFXFm3HFjF1zhaLSUyTZgCUfHI0/awq7S2mwUWNDhHiE/hiDQj5 cpTYPuQf+kqb0G+dorwTYAWvxWYw18vphnYD8zfhHNculTlb1IjgcAHggwF6TwY9eXKh 7tbPT7LoMUHpCtGZs91hyr+YYdUUQuia57WWHioZUoEiBtSXnbt9wOp8did8qNkwTHhM As5EVEqeutQVhtp2H5gKhJM5UlY4/2HjN7Gw72S35mL84JE7VXOtRApQCGGeKKhj3R5y +1gY44ZdzqmKYkDaGH1kQMDhJqa9tMsohOQ2qATMzIrt06bJbCegT+4PE1ZIJO3pGlit fMeA== Received: by 10.180.14.162 with SMTP id q2mr4254018wic.21.1354626257216; Tue, 04 Dec 2012 05:04:17 -0800 (PST) Received: from localhost.localdomain (lyon.paratronic.fr. [213.41.177.106]) by mx.google.com with ESMTPS id y3sm14984497wix.6.2012.12.04.05.04.16 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 04 Dec 2012 05:04:16 -0800 (PST) From: Richard Genoud To: u-boot@lists.denx.de Date: Tue, 4 Dec 2012 14:04:06 +0100 Message-Id: <1354626246-9613-1-git-send-email-richard.genoud@gmail.com> X-Mailer: git-send-email 1.7.2.5 Cc: Tom Rini , Marek Vasut Subject: [U-Boot] [PATCH] FAT: make FAT compile without VFAT X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Signed-off-by: Richard Genoud --- fs/fat/fat.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 393c378..defdd74 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -589,7 +589,9 @@ static dir_entry *get_dentfromdir(fsdata *mydata, int startsect, char *filename, dir_entry *retdent, int dols) { +#ifdef CONFIG_SUPPORT_VFAT __u16 prevcksum = 0xffff; +#endif __u32 curclust = START(retdent); int files = 0, dirs = 0; @@ -828,7 +830,9 @@ do_fat_read_at(const char *filename, unsigned long pos, void *buffer, fsdata datablock; fsdata *mydata = &datablock; dir_entry *dentptr = NULL; +#ifdef CONFIG_SUPPORT_VFAT __u16 prevcksum = 0xffff; +#endif char *subname = ""; __u32 cursect; int idx, isdir = 0; @@ -944,7 +948,9 @@ do_fat_read_at(const char *filename, unsigned long pos, void *buffer, for (i = 0; i < DIRENTSPERBLOCK; i++) { char s_name[14], l_name[VFAT_MAXLEN_BYTES]; +#ifdef CONFIG_SUPPORT_VFAT __u8 csum; +#endif l_name[0] = '\0'; if (dentptr->name[0] == DELETED_FLAG) { @@ -952,7 +958,9 @@ do_fat_read_at(const char *filename, unsigned long pos, void *buffer, continue; } +#ifdef CONFIG_SUPPORT_VFAT csum = mkcksum(dentptr->name, dentptr->ext); +#endif if (dentptr->attr & ATTR_VOLUME) { #ifdef CONFIG_SUPPORT_VFAT if ((dentptr->attr & ATTR_VFAT) == ATTR_VFAT &&