Skip to content
Snippets Groups Projects
Commit 1254b44a authored by Benoît Thébaudeau's avatar Benoît Thébaudeau Committed by Tom Rini
Browse files

fs/fat/fat_write: Fix management of empty files


Overwriting an empty file not created by U-Boot did not work, and it
could even corrupt the FAT. Moreover, creating empty files or emptying
existing files allocated a cluster, which is not standard.

Fix this by always keeping empty files clusterless as specified by
Microsoft (the start cluster must be set to 0 in the directory entry in
that case), and by supporting overwriting such files.

Signed-off-by: default avatarBenoît Thébaudeau <benoit@wsystem.com>
parent e876be4b
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment