When no more directory entries are available in the existing
cluster(s) of a directory on FAT32, we allocate an
extra cluster.
Make sure to zero out that new cluster, as disk checking utilities
may not stop reading when reaching an end of directory marker but
read the rest of cluster as well.
So there must not be any garbage data from a previously deleted file
in the sector there.
Also add checks to prevent getting in an endless loop on
encoutering circular "next cluster" references.
Minimal implementation for reading/writing files in the root
directory of a FAT16/FAT32 file system.
Can read/write from raw disk devices, and no longer relies on
operating system support for mounting the file system.
Currently assumes Imager will always be run on 'little endian'
architectures such as Intel and ARM (at least under Linux).
If there is a use-case for big-endian (anybody still using Sparc?)
this may be revisited later.