From patchwork Tue Dec 4 13:04:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot] FAT: make FAT compile without VFAT Date: Tue, 04 Dec 2012 03:04:06 -0000 From: Richard Genoud X-Patchwork-Id: 203616 Message-Id: <1354626246-9613-1-git-send-email-richard.genoud@gmail.com> To: u-boot@lists.denx.de Cc: Tom Rini , Marek Vasut 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 &&