Expand description
lamexfat — a no_std + alloc read-only exFAT filesystem reader for
UEFI bootloaders.
exFAT is never on the UEFI ESP (always FAT32 by spec), so lamexfat serves
removable/utility media — reading a kernel + initrd or a boot image off an
exFAT-formatted USB stick or SD card, including the > 4 GiB payloads FAT32
cannot hold. The public surface mirrors lamxfs::Xfs / the lam* family, so a
bootloader FsBackend adapter is a one-for-one mirror of the others.
Read-only by construction: there is no write path, allocator, or bitmap
mutation. Every on-disk count/offset/cluster-chain is bounds- and
cycle-checked, and ExFat::read caps its allocation at MAX_FILE_BYTES
so a hostile DataLength cannot drive a denial-of-boot.
Clean-room status: the on-disk parsing is adapted from exfat-slim
(github.com/ninjasource/exfat-slim, Apache-2.0) — see NOTICE and the
per-file headers. New code is MIT OR Apache-2.0.
Structs§
- DirEntry
- A directory entry.
nameis the decoded (lossy-UTF-8) file name. - ExFat
- A mounted, read-only exFAT volume.
- Metadata
- Inode-equivalent metadata from a directory entry set.
- Path
- A path within the volume, as raw bytes. Components are
/-separated; empty components and.are ignored by the resolver, so/boot//vmlinuzand/boot/vmlinuzresolve identically.lamexfatdoes not own paths.
Enums§
- Entry
Kind - The kind of a directory entry.
- Error
- A read or mount failure.
- VbrReason
- Why a boot sector / VBR was rejected.
Constants§
- MAX_
FILE_ BYTES - Largest file
ExFat::readwill allocate up front. A hostile StreamExtension can declare a multi-GiBDataLengthwhile occupying no clusters; this cap refuses the allocation rather than letting it abort the boot (mirrors lamboot’sMAX_BOOT_FILE_BYTES).ExFat::read_atstreams into a caller-sized buffer and is unaffected.
Traits§
- Block
Read - Block-level reads for a mounted volume.