rust-fatfs/src
Henry Gabryjelski 2a4c01082a Preserve 4 MSB in FAT32 entries and add more sanity checks (#13)
* Update compatibility maximum cluster size when sector size is larger than 512 bytes.

* Additional validation of values in FsInfo sector.
* next_free_cluster cannot be 0 or 1, as these are reserved clusters
* next_free_cluster must be a valid cluster (using BPB to validate)
* free_cluster_count must be possible value (using BPB to validate)

* Avoid data-loss edge-case on volumes over 138GB in size.

Specifically, if the volume has more
than 0x0FFF_FFF4 clusters, then the FAT
will include an entry for clusters that
are reserved values.  Specifically, cluster
number 0x0FFF_FFF7 is defined to mean
BAD_SECTOR, while numbers 0x0FFF_FFF8 ..
0x0FFF_FFFF are defined to mean end-of-chain.

This prevents these clusters from being part
of any valid cluster chain.  Therefore:
1. prevent setting these clusters to point to
   a valid next cluster
2. prevent reading these clusters as pointing
   to a valid next cluster

Instead, always read/write these FAT entries
to have next cluster value of BAD_SECTOR.

* Reduce noisy warnings on FAT32.

* The reserved bits in FAT entry must be preserved on update.

* Change the set() implementation for FAT32 entries to return an actual Err(),
when attempting to set values for cluster numbers that have special meaning.
2018-10-06 16:42:31 +02:00
..
byteorder_core_io.rs Improve code style using rustfmt 2018-06-28 18:13:07 +02:00
dir_entry.rs Simplify code dealing with LFN entries generation 2018-08-05 17:12:03 +02:00
dir.rs Fix warnings for file entries without LFN entries 2018-09-29 15:19:46 +02:00
file.rs Mark volume dirty on first write and not-dirty on unmount 2018-06-29 15:35:37 +02:00
fs.rs Preserve 4 MSB in FAT32 entries and add more sanity checks (#13) 2018-10-06 16:42:31 +02:00
lib.rs Move time related code to 'time' module 2018-06-28 18:53:51 +02:00
table.rs Preserve 4 MSB in FAT32 entries and add more sanity checks (#13) 2018-10-06 16:42:31 +02:00
time.rs Implement the same traits for FsOptions as in current stable release 2018-06-28 19:16:04 +02:00