summaryrefslogtreecommitdiff
path: root/fs/fat/fat.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2012-01-02 06:54:29 +0000
committerWolfgang Denk <wd@denx.de>2012-01-05 16:03:24 +0100
commitbf34e7d952939b1d4289ef62e7d940fbd227c72a (patch)
tree78c23268d09160bd02e6f03bb656880fcc276e90 /fs/fat/fat.c
parent2620368a61962db528932aab5d979f333a90908b (diff)
downloadu-boot-imx-bf34e7d952939b1d4289ef62e7d940fbd227c72a.zip
u-boot-imx-bf34e7d952939b1d4289ef62e7d940fbd227c72a.tar.gz
u-boot-imx-bf34e7d952939b1d4289ef62e7d940fbd227c72a.tar.bz2
fat: reset VFAT short alias checksum on first match
The VFAT short alias checksum read from a long file name is only overwritten when another long file name appears in a directory list. Until then it renders short file names invisible that have the same checksum. Reset the checksum on first match. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Martin Mueller <martin.mueller5@de.bosch.com>
Diffstat (limited to 'fs/fat/fat.c')
-rw-r--r--fs/fat/fat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index dbb8db9..1542194 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -633,6 +633,7 @@ static dir_entry *get_dentfromdir (fsdata *mydata, int startsect,
}
#ifdef CONFIG_SUPPORT_VFAT
if (dols && mkcksum(dentptr->name) == prevcksum) {
+ prevcksum = 0xffff;
dentptr++;
continue;
}
@@ -963,6 +964,7 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize,
#ifdef CONFIG_SUPPORT_VFAT
else if (dols == LS_ROOT &&
mkcksum(dentptr->name) == prevcksum) {
+ prevcksum = 0xffff;
dentptr++;
continue;
}