6 Commits

Author SHA1 Message Date
Michael Stapelberg
4716d3fefe fat: fix: calculate offset instead of keeping track
Keeping track of the offset depends on the order in which entries are written,
i.e. breaks as soon as you have multiple nested directories.
Calculating the offset is shorter and more robust.

related to https://github.com/gokrazy/internal/issues/6
2021-06-20 14:43:41 +02:00
Michael Stapelberg
f2bd9b32d8 fat: fix writing directories and subdirectories
When writing directory entries, we now allocate the FAT entries
before writing, so that we can synthesize the . and .. entries
which need FirstCluster and parent.FirstCluster to be set.

This code currently assumes each directory consumes only 1 cluster
(space for 64 directory entries, I think).
2021-06-19 20:29:54 +02:00
Michael Stapelberg
3567162db3 fat: pad the file system for now-stricter dosfsck 2021-06-19 20:29:54 +02:00
Joonas Kuorilehto
ab6fc6e02a Fix short name with short primary and long extension (#7)
Fixes gokrazy/internal#5
2020-07-13 10:41:55 +02:00
Michael Stapelberg
e166c599fa update import paths 2017-07-14 03:18:19 +02:00
Michael Stapelberg
580b69f8dc Move FAT16B writer from github.com/gokrazy/fat to internal 2017-07-14 03:14:28 +02:00