]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fs: fat: directory entries starting with 0x05
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 21 Nov 2020 11:34:20 +0000 (12:34 +0100)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 29 Nov 2020 04:18:16 +0000 (05:18 +0100)
0x05 is used as replacement letter for 0xe5 at the first position of short
file names. We must not skip over directory entries starting with 0x05.

Cf. Microsoft FAT Specification, August 30 2005

Fixes: 39606d462c97 ("fs: fat: handle deleted directory entries correctly")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
fs/fat/fat.c

index 28aa5aaa9ffb5fb8f53f61790daa08530a2fc370..fb6ba894664268fef9141d2fb620e2640b7a4dbe 100644 (file)
@@ -926,8 +926,7 @@ static int fat_itr_next(fat_itr *itr)
                if (!dent)
                        return 0;
 
-               if (dent->name[0] == DELETED_FLAG ||
-                   dent->name[0] == aRING)
+               if (dent->name[0] == DELETED_FLAG)
                        continue;
 
                if (dent->attr & ATTR_VOLUME) {