Skip to content

Commit

Permalink
fs: fat: fix fat iteration
Browse files Browse the repository at this point in the history
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: 39606d4 ("fs: fat: handle deleted directory entries correctly")
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
  • Loading branch information
austriancoder authored and trini committed Jul 7, 2020
1 parent 53007fc commit 1788a96
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/fat/fat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1788a96

Please sign in to comment.