diff options
author | Przemyslaw Marczak <p.marczak@samsung.com> | 2014-12-18 17:14:17 +0100 |
---|---|---|
committer | Peng Fan <Peng.Fan@freescale.com> | 2015-04-27 10:18:15 +0800 |
commit | 759f5cc7f5fcff836df359d46d956bd233889e8b (patch) | |
tree | f26138e6e89bb830162acf2e60a58a09d0461c64 /include/dm.h | |
parent | eb8e8bfb2f6fec4b741aa7973348f401ab182065 (diff) | |
download | u-boot-imx-759f5cc7f5fcff836df359d46d956bd233889e8b.zip u-boot-imx-759f5cc7f5fcff836df359d46d956bd233889e8b.tar.gz u-boot-imx-759f5cc7f5fcff836df359d46d956bd233889e8b.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/dm.h')
0 files changed, 0 insertions, 0 deletions