[U-Boot] [PATCH v1] fat: fatwrite: fix the command for FAT12

Benoît Thébaudeau benoit.thebaudeau.dev at gmail.com
Sun Dec 11 00:21:45 CET 2016


Dear Philipp Skadorov,

On Fri, Dec 9, 2016 at 7:55 PM, Philipp Skadorov
<philipp.skadorov at savoirfairelinux.com> wrote:
> 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.
>
> 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 is to check file bounds by already-existing macro that
> accounts for FAT12.
> The command then works correctly for all types of FAT.
>
> Signed-off-by: Philipp Skadorov <philipp.skadorov at savoirfairelinux.com>
> Cc:Donggeun Kim <dg77.kim at samsung.com>

[...]

Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau.dev at gmail.com>

Best regards,
Benoît


More information about the U-Boot mailing list