From 763c0e81936b6f7394b2c5dfb99c733512078e30 Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 27 Oct 2025 19:06:15 +0800 Subject: [PATCH] make boardtype return the current boardtype when no args given --- bao1x-boot/boot1/src/repl.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bao1x-boot/boot1/src/repl.rs b/bao1x-boot/boot1/src/repl.rs index 0a47f5f62..010417e82 100644 --- a/bao1x-boot/boot1/src/repl.rs +++ b/bao1x-boot/boot1/src/repl.rs @@ -184,7 +184,14 @@ impl Repl { } "boardtype" => { let one_way = OneWayCounter::new(); - if args.len() != 1 { + if args.len() == 0 { + crate::println!( + "Board type is set to: {:?}", + one_way.get_decoded::().expect("owc coding error") + ); + self.abort_cmd(); + return Ok(()); + } else if args.len() != 1 { return Err(Error::help("boardtype [dabao | baosec | oem]")); } let new_type = match args[0].as_str() {