fs: fat: fix fat iteration
authorChristian Gmeiner <christian.gmeiner@gmail.com>
Tue, 9 Jun 2020 07:09:07 +0000 (09:09 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 7 Jul 2020 13:45:12 +0000 (09:45 -0400)
According to the FAT specification it is valid to have files with an
attribute value of 0x0. This fixes a regression where different U-Boot
versions are showing different amount of files on the same storage
device. With this change U-Boot shows the same number of files and folders
as Linux and Windows.

Fixes: 39606d462c ("fs: fat: handle deleted directory entries correctly")
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
fs/fat/fat.c

index 7fd2947..9578b74 100644 (file)
@@ -949,9 +949,7 @@ static int fat_itr_next(fat_itr *itr)
                                /* Volume label or VFAT entry, skip */
                                continue;
                        }
-               } else if (!(dent->attr & ATTR_ARCH) &&
-                          !(dent->attr & ATTR_DIR))
-                       continue;
+               }
 
                /* short file name */
                break;