pub struct ManifestWriter {
name: [u8; 64],
name_len: usize,
total_size: u64,
sha256: [u8; 32],
flags: u8,
}Expand description
Binary manifest for ISO chunks
Format:
Offset Size Field
0x00 8 Magic "MXISO\x02\x00\x00"
0x08 64 ISO name (null-terminated)
0x48 8 Total size (u64 LE)
0x50 32 SHA256 hash (or zeros)
0x70 1 Number of chunks
0x71 1 Flags
0x72 2 Reserved
0x74 4 Header CRC32
0x78 8 Reserved
0x80 N*48 Chunk entriesFields§
§name: [u8; 64]ISO name
name_len: usizeName length
total_size: u64Total ISO size
sha256: [u8; 32]SHA256 hash
flags: u8Flags
Implementations§
Source§impl ManifestWriter
impl ManifestWriter
Sourcepub fn set_complete(&mut self, complete: bool)
pub fn set_complete(&mut self, complete: bool)
Mark as complete
Sourcepub fn set_verified(&mut self, verified: bool)
pub fn set_verified(&mut self, verified: bool)
Mark as verified
Sourcepub fn serialize(
&self,
chunks: &ChunkSet,
buffer: &mut [u8],
) -> DiskResult<usize>
pub fn serialize( &self, chunks: &ChunkSet, buffer: &mut [u8], ) -> DiskResult<usize>
Serialize manifest to buffer
Returns number of bytes written.
Sourcepub fn write_to_esp<B: BlockIo>(
&self,
block_io: &mut B,
esp_start_lba: u64,
manifest_offset: u64,
chunks: &ChunkSet,
) -> DiskResult<()>
pub fn write_to_esp<B: BlockIo>( &self, block_io: &mut B, esp_start_lba: u64, manifest_offset: u64, chunks: &ChunkSet, ) -> DiskResult<()>
Write manifest to ESP partition
Writes to /.iso/<name>.manifest conceptually,
but since we can’t do FAT32 file ops without alloc, we write
to a fixed location within the ESP.
§Arguments
block_io- Block I/O deviceesp_start_lba- Start LBA of ESP partitionmanifest_offset- Sector offset within ESP for manifest storagechunks- Chunk information to write
Sourcepub fn write_to_esp_fat32<B: BlockIo>(
&self,
block_io: &mut B,
esp_start_lba: u64,
chunks: &ChunkSet,
) -> DiskResult<()>
pub fn write_to_esp_fat32<B: BlockIo>( &self, block_io: &mut B, esp_start_lba: u64, chunks: &ChunkSet, ) -> DiskResult<()>
Write manifest as FAT32 file to ESP
Writes to /.iso/<short_name>.mfst on the ESP.
Uses 8.3 compatible filenames for FAT32 compatibility.
This is the preferred method as it integrates with the bootloader scanner.
§Requirements
- Heap allocator must be initialized (crate::alloc_heap::init_heap())
- ESP must be a valid FAT32 partition
§Arguments
block_io- Block I/O deviceesp_start_lba- Start LBA of ESP partitionchunks- Chunk information to write
Auto Trait Implementations§
impl Freeze for ManifestWriter
impl RefUnwindSafe for ManifestWriter
impl Send for ManifestWriter
impl Sync for ManifestWriter
impl Unpin for ManifestWriter
impl UnwindSafe for ManifestWriter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more