bless method added to mark partition which has booted successfully
This commit is contained in:
parent
c00e11ee8f
commit
a0d39431e8
@ -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<bool> {
|
||||
if Mount::is_path_mounted(path)? {
|
||||
if Mount::is_source_mounted(path)? {
|
||||
return Ok(true);
|
||||
}
|
||||
let holders = count_block_holders(path)?;
|
||||
|
Loading…
Reference in New Issue
Block a user