mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
improve pddb init
This commit is contained in:
parent
63e78b202b
commit
c3c86e857b
2 changed files with 6 additions and 2 deletions
|
|
@ -2510,7 +2510,7 @@ impl PddbOs {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.entropy.borrow_mut().get_slice(&mut temp);
|
self.entropy.borrow_mut().get_slice(&mut temp);
|
||||||
if (offset / PAGE_SIZE) % 256 == 0 {
|
if (offset / PAGE_SIZE) % 32 == 0 {
|
||||||
// ~one update per megabyte
|
// ~one update per megabyte
|
||||||
log::info!("Cryptographic 'erase': {}/{}", offset, PDDB_A_LEN);
|
log::info!("Cryptographic 'erase': {}/{}", offset, PDDB_A_LEN);
|
||||||
if let Some(modals) = progress {
|
if let Some(modals) = progress {
|
||||||
|
|
|
||||||
|
|
@ -841,7 +841,11 @@ fn wrapped_main() -> ! {
|
||||||
unreachable!();
|
unreachable!();
|
||||||
}
|
}
|
||||||
PasswordState::Incorrect(_failcount) => {
|
PasswordState::Incorrect(_failcount) => {
|
||||||
unreachable!();
|
log::warn!("PDDB formatted, but keys rotated. Formatting PDDB!");
|
||||||
|
pddb_os.pddb_format(false, None).expect("couldn't format PDDB");
|
||||||
|
if !try_mount(&mut pddb_os, &mut basis_cache, &mut basis_monitor_notifications) {
|
||||||
|
panic!("Couldn't format & mount PDDB");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// the above operation should either succeed or panic, so we are always "success" here
|
// the above operation should either succeed or panic, so we are always "success" here
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue