diff --git a/libcitadel/src/partition.rs b/libcitadel/src/partition.rs index 3b7e306..474303b 100644 --- a/libcitadel/src/partition.rs +++ b/libcitadel/src/partition.rs @@ -166,10 +166,17 @@ impl Partition { } Ok(()) } + + pub fn bless(&mut self) -> Result<()> { + if self.header().status() == ImageHeader::STATUS_TRY_BOOT { + self.write_status(ImageHeader::STATUS_GOOD)?; + } + Ok(()) + } } fn is_in_use(path: &Path) -> Result { - if Mount::is_path_mounted(path)? { + if Mount::is_source_mounted(path)? { return Ok(true); } let holders = count_block_holders(path)?;