aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2020-06-09 09:09:07 +0200
committerTom Rini <trini@konsulko.com>2020-07-07 09:45:12 -0400
commit1788a9697f51aebb25623e6216c09304756748ff (patch)
treea68e6c2ae0b580d60f26d3e4c2575116fe4b6e40 /fs
parent53007fc1eb892cd67af97c545eb3461020cc3885 (diff)
downloadu-boot-1788a9697f51aebb25623e6216c09304756748ff.zip
u-boot-1788a9697f51aebb25623e6216c09304756748ff.tar.gz
u-boot-1788a9697f51aebb25623e6216c09304756748ff.tar.bz2
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 <christian.gmeiner@gmail.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/fat/fat.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index 7fd2947..9578b74 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;