diff options
author | Przemyslaw Marczak <p.marczak@samsung.com> | 2014-12-18 17:14:17 +0100 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2015-01-05 15:13:46 -0500 |
commit | 64f65e1e36adffc39730635d104399937ea21949 (patch) | |
tree | e2df60c87bf02cfe8b31605d6bf358fc82e74c53 /include/keyboard.h | |
parent | 5b782e3f4ca8784c6439d5ca5b620ad6ec073e51 (diff) | |
download | u-boot-imx-64f65e1e36adffc39730635d104399937ea21949.zip u-boot-imx-64f65e1e36adffc39730635d104399937ea21949.tar.gz u-boot-imx-64f65e1e36adffc39730635d104399937ea21949.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>
Diffstat (limited to 'include/keyboard.h')
0 files changed, 0 insertions, 0 deletions