nathanhi / pyfatfs

Python based FAT12/FAT16/FAT32 implementation with VFAT support
https://pypi.org/project/pyfatfs/
MIT License
29 stars 14 forks source link

Support FAT12 sectors larger than 512 bytes #30

Closed zurcher closed 1 year ago

zurcher commented 1 year ago

In the mkfs function, the FAT12 cluster size of 64 sectors limits FAT12 implementations to 512-byte sectors only. This change introduces a new table while maintaining the 4084-cluster limit for FAT12 prescribed by fatgen103.

zurcher commented 1 year ago

It seems the default tests from pyfilesystem2 include ~10MB of data, but the default FS size in test_PyFatFS.py is 4MB for FAT12. Added another table entry to allow up to 16MB for FAT12 and updated the test to allocate 15MB for FAT12.