fuchsia_bootfs/
bootfs.rs

1// Copyright 2019 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Generated by garnet/public/rust/fuchsia-bootfs/scripts/bindgen.sh
6// Manually modified to remove unused constants and structs.
7
8/* automatically generated by rust-bindgen */
9use 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}