incubator-nuttx/fs/fat
Windrow14 479c393291 fs/fat/fs_fat32.[c|h]: fix fseek bug when file size is multiple of cluster size
Unbinding `ff_currentcluster` and `f_pos`:
1. Added `ff_pos` in `struct fat_file_s`.
2. Added function `fat_zero_cluster` for doing zeroing for gap
   between EOF and new position beyond EOF.
3. Added function `fat_get_sectors` for getting the sector where
   `f_pos` is located, allocting new cluster when `f_pos` is beyond
   EOF.
4. Modify function `fat_read`, and `fat_write` with above functions.
5. Remove redundant logics in `fat_seek` since now new cluster is
   allocated when writing instead of seeking.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-07-06 19:00:01 +08:00
..
CMakeLists.txt
Kconfig Kconfig: Simplify the conditional default statement 2023-07-16 14:39:20 -03:00
Make.defs
fs_fat32.c fs/fat/fs_fat32.[c|h]: fix fseek bug when file size is multiple of cluster size 2024-07-06 19:00:01 +08:00
fs_fat32.h fs/fat/fs_fat32.[c|h]: fix fseek bug when file size is multiple of cluster size 2024-07-06 19:00:01 +08:00
fs_fat32attrib.c fs/inode: remove all unnecessary check for filep/inode 2023-08-29 09:47:11 +08:00
fs_fat32dirent.c docs/fs/vfat: Improve VFAT documentation 2024-02-05 03:43:41 -08:00
fs_fat32util.c docs/fs/vfat: Improve VFAT documentation 2024-02-05 03:43:41 -08:00