fuchsia_bootfs/
bootfs.rs
1use zerocopy::byteorder::little_endian::U32;
10use zerocopy::{FromBytes, Immutable, KnownLayout, Unaligned};
11
12pub const ZBI_BOOTFS_PAGE_SIZE: u32 = 4096;
13pub const ZBI_BOOTFS_MAGIC: u32 = 2775400441;
14pub const ZBI_BOOTFS_MAX_NAME_LEN: u32 = 256;
15
16#[repr(C)]
17#[derive(Debug, Default, Copy, Clone, KnownLayout, FromBytes, Immutable, Unaligned)]
18pub struct zbi_bootfs_header_t {
19 pub magic: U32,
20 pub dirsize: U32,
21 pub reserved0: U32,
22 pub reserved1: U32,
23}
24#[repr(C)]
25#[derive(Debug, Default, KnownLayout, FromBytes, Immutable, Unaligned)]
26pub struct zbi_bootfs_dirent_t {
27 pub name_len: U32,
28 pub data_len: U32,
29 pub data_off: U32,
30}