]> git.sur5r.net Git - u-boot/commitdiff
fat: reset VFAT short alias checksum on first match
authorSergei Shtylyov <sshtylyov@ru.mvista.com>
Mon, 2 Jan 2012 06:54:29 +0000 (06:54 +0000)
committerWolfgang Denk <wd@denx.de>
Thu, 5 Jan 2012 15:03:24 +0000 (16:03 +0100)
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>
fs/fat/fat.c

index dbb8db92f07a397fdd6998349f3b82ae2d9bca0f..1542194a1a66a983df14fb41bbe22f26fdc1c091 100644 (file)
@@ -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;
                        }