sync PDDB before churning or flushing

This commit is contained in:
bunnie 2022-07-28 04:47:32 +08:00
parent a68eb7cc73
commit deecd3651d

View file

@ -217,8 +217,13 @@ impl<'a> ShellCmdApi<'a> for PddbCmd {
}
}
"churn" => {
write!(ret, "Sync result code: {:?}\n", self.pddb.sync()).ok();
write!(ret, "Churn result code: {:?}", self.pddb.rekey_pddb(pddb::PddbRekeyOp::Churn)).ok();
}
"flush" => {
write!(ret, "Sync result code: {:?}\n", self.pddb.sync()).ok();
write!(ret, "Flush result code: {:?}", self.pddb.flush_space_update()).ok();
}
#[cfg(feature="test-rekey")]
"rekey" => {
let old_dna = if let Some(dna_str) = tokens.next() {