add a confirmation argument to erasing the disk

This commit is contained in:
bunnie 2025-12-19 16:22:24 +08:00
parent 1e4e9694e9
commit a6870a617f

View file

@ -459,6 +459,12 @@ impl Repl {
}
},
"baosec-init" => {
if !matches!(args.as_slice(), [s] if s == "confirm") {
return Err(Error::help(
"Usage: 'baosec-init confirm'. WARNING: erases external storage!",
));
}
// this routine is used to initialize baosec products - sets the board type and
// erases the off-chip FLASH
use bao1x_api::{baosec::PDDB_LEN, baosec::PDDB_ORIGIN};