diff --git a/libcitadel/src/header.rs b/libcitadel/src/header.rs index 9df4bcc..e8d7935 100644 --- a/libcitadel/src/header.rs +++ b/libcitadel/src/header.rs @@ -297,24 +297,35 @@ pub struct MetaInfo { struct MetaInfoToml { #[serde(rename = "image-type")] image_type: String, + + #[serde(default)] channel: String, + #[serde(rename = "kernel-version")] kernel_version: Option, + #[serde(rename = "kernel-id")] kernel_id: Option, + #[serde(rename = "realmfs-name")] realmfs_name: Option, + + #[serde(default)] version: u32, + + #[serde(default)] timestamp: String, - #[serde(rename = "base-version")] - base_version: Option, - date: Option, - gitrev: Option, + + #[serde(default)] nblocks: u32, + + #[serde(default)] shasum: String, - #[serde(rename = "verity-salt")] + + #[serde(default, rename = "verity-salt")] verity_salt: String, - #[serde(rename = "verity-root")] + + #[serde(default, rename = "verity-root")] verity_root: String, } @@ -363,14 +374,6 @@ impl MetaInfo { &self.toml().timestamp } - pub fn date(&self) -> Option<&str> { - self.toml().date.as_ref().map(|s| s.as_str()) - } - - pub fn gitrev(&self) -> Option<&str> { - self.toml().gitrev.as_ref().map(|s| s.as_str()) - } - pub fn nblocks(&self) -> usize { self.toml().nblocks as usize }