rust-fatfs/examples
Henry Gabryjelski 2d689a668d Add more sanity checks and fix size formatting in ls example (#11)
* Fix copy/paste errors in ls example so file sizes are correctly output.
* BPB updates.

Fix bug in bpb.active_fat(), because active_fat is
only valid when mirroring is disabled.

Add additional santiy checks to BPB deserialization:
1. bytes per sector must be a power of 2
2. 512 <= bytes per sector <= 4096
3. sectors per cluster must be a power of 2
4. 1 <= sectors per cluster <= 128

Also added some comments relating to conditions that
may be useful to WARN about for BPB deserialization:
Z. bpb.reserved_sectors should be 1
Y. bpb.fats should be either 1 or 2
X. bpb.fs_version should be validated as zero

Add syntactic sugar for:
A. bpb.is_fat32()
B. bpb.sectors_per_fat()
C. bpb.total_sectors()
2018-09-24 20:58:02 +02:00
..
cat.rs Move BufStream to fscommon crate (BREAKING CHANGE) 2018-06-16 17:57:29 +02:00
ls.rs Add more sanity checks and fix size formatting in ls example (#11) 2018-09-24 20:58:02 +02:00
partition.rs Improve code style using rustfmt 2018-06-28 18:13:07 +02:00
write.rs Improve code style using rustfmt 2018-06-28 18:13:07 +02:00