Add size to the initfs header
This commit is contained in:
@@ -72,6 +72,7 @@ pub struct Header {
|
||||
pub creation_time: Timespec,
|
||||
pub inode_count: U16,
|
||||
pub bootstrap_entry: U64,
|
||||
pub initfs_size: U64,
|
||||
}
|
||||
|
||||
const _: () = {
|
||||
|
||||
@@ -487,6 +487,7 @@ pub fn archive(
|
||||
inode_count: state.inode_count.into(),
|
||||
inode_table_offset,
|
||||
bootstrap_entry: bootstrap_entry.into(),
|
||||
initfs_size: state.file.metadata().context("failed to get initfs size")?.len().into(),
|
||||
};
|
||||
write_all_at(&*state.file, &header_bytes, header_offset, "writing header")
|
||||
.context("failed to write header")?;
|
||||
|
||||
Reference in New Issue
Block a user