u-boot-2016/fs/fat
Philipp Skadorov 5593ba9b9f fat: fatwrite: fix the command for FAT12
The u-boot command fatwrite empties FAT clusters from the beginning
till the end of the file.
Specifically for FAT12 it fails to detect the end of the file and goes
beyond the file bounds thus corrupting the file system.

Additionally, FAT entry chaining-up into a file is not implemented
for FAT12.

The users normally workaround this by re-formatting the partition as
FAT16/FAT32, like here:
https://github.com/FEDEVEL/openrex-uboot-v2015.10/issues/1

The patch fixes the bounds of a file and FAT12 entries chaining into
a file, including EOF markup.

Signed-off-by: Philipp Skadorov <philipp.skadorov@savoirfairelinux.com>
(cherry picked from commit 49abbd9cc3)
Signed-off-by: Hariharan K <quic_harihk@quicinc.com>

Change-Id: Ib9c75d4553ea576cbc592f3291cfdebc45b8376b
2023-01-29 21:18:01 -08:00
..
fat.c FIX: fat: Provide correct return code from disk_{read|write} to upper layers 2015-09-11 17:15:21 -04:00
fat_write.c fat: fatwrite: fix the command for FAT12 2023-01-29 21:18:01 -08:00
file.c fat: Prepare API change for files greater than 2GB 2014-11-23 06:49:04 -05:00
Kconfig kconfig: add blank Kconfig files 2014-09-24 18:30:28 -04:00
Makefile fs: convert makefiles to Kbuild style 2013-10-31 13:26:01 -04:00