summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPrzemyslaw Marczak <p.marczak@samsung.com>2014-12-18 17:14:17 +0100
committerPeng Fan <Peng.Fan@freescale.com>2015-04-27 10:46:13 +0800
commitc771a2790474b026bbb6d808285185362cee3e66 (patch)
tree70c7558824df97463e05a2d804a4f54861d06a92 /include
parent7c4bee613dc47c9e2fb147a159236bca04b8618b (diff)
downloadu-boot-imx-c771a2790474b026bbb6d808285185362cee3e66.zip
u-boot-imx-c771a2790474b026bbb6d808285185362cee3e66.tar.gz
u-boot-imx-c771a2790474b026bbb6d808285185362cee3e66.tar.bz2
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 <p.marczak@samsung.com> Cc: Mikhail Zolotaryov <lebon@lebon.org.ua> Cc: Tom Rini <trini@ti.com> Cc: Stephen Warren <swarren@nvidia.com> Cc: Simon Glass <sjg@chromium.org> Cc: Suriyan Ramasami <suriyan.r@gmail.com> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Wolfgang Denk <wd@denx.de> Tested-by: Simon Glass <sjg@chomium.org> (cherry picked from commit 64f65e1e36adffc39730635d104399937ea21949)
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions