diff --git a/README.md b/README.md index 0e186e3..f4927fc 100644 --- a/README.md +++ b/README.md @@ -279,13 +279,13 @@ succcess, 1 on failure. ``` # Check which devices it's available for -> ./framework_system --device - [possible values: bios, ec, pd0, pd1, rtm01, rtm23] +> ./framework_tool --device + [possible values: bios, ec, pd0, pd1, rtm01, rtm23, ac-left, ac-right] For more information try '--help' # Successful compare -> ./framework_system --device bios --compare-version 03.01 +> ./framework_tool --device bios --compare-version 03.01 Target Version "03.01" Comparing BIOS version "03.01" Compared version: 0 @@ -293,7 +293,7 @@ Compared version: 0 0 # Failed compare -> ./framework_system --device bios --compare-version 03.00 +> ./framework_tool --device bios --compare-version 03.00 Finished dev [unoptimized + debuginfo] target(s) in 0.05s Target Version "03.00" Comparing BIOS version "03.01" @@ -304,6 +304,29 @@ Error: "Fail" 1 ``` +On UEFI Shell: + +``` +# Check if AC is attached on left side +Shell> fs0:framework_tool.efi --device ac-left --compare-version 1 +Target Version "1" +Comparing AcLeft "1" +Comparison Result: 0 +# It is +Shell> echo %lasterror% +0x0 + +# Check if AC is attached on right side +Shell> fs0:framework_tool.efi --device ac-right --compare-version 1 +Target Version "1" +Comparing AcLeft "0" +Comparison Result: 1 + +# It is not +Shell> echo %lasterror% +0x1 +``` + ## Debugging To debug, increase the verbosity from the commandline with `-v`. diff --git a/framework_lib/src/commandline/uefi.rs b/framework_lib/src/commandline/uefi.rs index 3a656fe..283f01a 100644 --- a/framework_lib/src/commandline/uefi.rs +++ b/framework_lib/src/commandline/uefi.rs @@ -436,12 +436,16 @@ pub fn parse(args: &[String]) -> Cli { Some(HardwareDeviceType::RTM01) } else if console_arg == "rtm23" { Some(HardwareDeviceType::RTM23) + } else if console_arg == "ac-left" { + Some(HardwareDeviceType::AcLeft) + } else if console_arg == "ac-right" { + Some(HardwareDeviceType::AcRight) } else { println!("Invalid value for --device: {}", console_arg); None } } else { - println!("Need to provide a value for --console. Either `follow` or `recent`"); + println!("Need to provide a value for --console. Possible values: bios, ec, pd0, pd1, rtm01, rtm23, ac-left, ac-right"); None }; }