From: Christian Gmeiner Date: Tue, 9 Jun 2020 07:09:07 +0000 (+0200) Subject: fs: fat: fix fat iteration X-Git-Tag: v2025.01-rc5-pxa1908~2328 X-Git-Url: http://git.dujemihanovic.xyz/img/static/%7B%7B%20%24style.RelPermalink%20%7D%7D?a=commitdiff_plain;h=1788a9697f51aebb25623e6216c09304756748ff;p=u-boot.git fs: fat: fix fat iteration 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 --- diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 7fd29470c1..9578b74bae 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -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;