1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! `lamxfs` — a `no_std` read-only XFS filesystem reader for UEFI bootloaders.
//!
//! Clean-room implementation written from the public XFS on-disk format (the
//! SGI/Red Hat *XFS Algorithms & Data Structures* document and the Linux
//! `fs/xfs/libxfs` on-disk headers — uncopyrightable format facts). No
//! third-party filesystem source is vendored.
//!
//! ## Scope
//!
//! Read-only. Single data device. The subset of XFS actually present on `/boot`
//! and `/` of stock RHEL-family installs: v4 (no-CRC) and v5 (CRC, self-
//! describing) layouts, `NREXT64` large extent counts, sparse inodes, `ftype`
//! directory entries, reflinks (transparent read-pass-through), and `meta_uuid`.
//! Realtime devices, external/dirty logs, and per-file encryption are rejected
//! with a typed error rather than mis-read. There is no write path and no
//! `BlockWrite` trait — read-only by construction.
//!
//! ## Shape
//!
//! The public surface mirrors `lambutter::Btrfs` so a bootloader's filesystem
//! adapter is a one-for-one analogue across the read-only-FS family:
//!
//! ```ignore
//! let mut fs = Xfs::open(reader, device_size_bytes)?;
//! let data = fs.read_file(Path::new(b"/boot/vmlinuz-6.1.0"))?;
//! ```
//!
//! `read_file` caps its own allocation at [`MAX_FILE_BYTES`] (a hostile inode can
//! declare a multi-GiB size while occupying no extents — the read contract from
//! LamBoot's `fs_backend` security audit). `read_file_at` streams into a
//! caller-sized buffer and is the path the PE loader uses for kernel images.
extern crate alloc;
pub use BlockRead;
pub use ;
pub use Path;
pub use ;