path: root/disk
diff options
authorPrzemyslaw Marczak <>2014-12-18 17:14:17 +0100
committerTom Rini <>2015-01-05 15:13:46 -0500
commit64f65e1e36adffc39730635d104399937ea21949 (patch)
treee2df60c87bf02cfe8b31605d6bf358fc82e74c53 /disk
parent5b782e3f4ca8784c6439d5ca5b620ad6ec073e51 (diff)
fs: fat: read: fix fat16 ls/read issue
The present fat implementation ignores FAT16 long name directory entries which aren't placed in a single sector. This was becouse of the buffer was always filled by the two sectors, and the loop was made also for two sectors. If some file long name entries are stored in two sectors, the we have two cases: Case 1: Both of sectors are in the buffer - all required data for long file name is in the buffer. - Read OK! Case 2: The current directory entry is placed at the end of the second buffered sector. And the next entries are placed in a sector which is not buffered yet. Then two next sectors are buffered and the mentioned entry is ignored. - Read fail! This commit fixes this issue by: - read two sectors after loop on each single is done - keep the last used sector as a first in the buffer before the read of two next The commit doesn't affects the fat32 imlementation, which works good as previous. Signed-off-by: Przemyslaw Marczak <> Cc: Mikhail Zolotaryov <> Cc: Tom Rini <> Cc: Stephen Warren <> Cc: Simon Glass <> Cc: Suriyan Ramasami <> Cc: Lukasz Majewski <> Cc: Wolfgang Denk <> Tested-by: Simon Glass <>
Diffstat (limited to 'disk')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud