Skip to content

Commit 2863f84

Browse files
committed
--versions: Print SSD Firmware version on Windows
Uses SCSI passthrough. Example > target\debug\framework_tool.exe --versions FRMW 1TB Card: UHFM00.6 [...] SSD Expansion Cards FRMW 1TB Card: UHFM00.6 [...] Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent 7bc266d commit 2863f84

3 files changed

Lines changed: 516 additions & 14 deletions

File tree

framework_lib/src/commandline/mod.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ use crate::power;
5757
use crate::smbios;
5858
use crate::smbios::ConfigDigit0;
5959
use crate::smbios::{dmidecode_string_val, get_smbios, is_framework};
60+
#[cfg(windows)]
61+
use crate::ssd_expansion_card;
6062
#[cfg(feature = "hidapi")]
6163
use crate::touchpad::print_touchpad_fw_ver;
6264
#[cfg(feature = "hidapi")]
@@ -662,6 +664,19 @@ fn print_versions(ec: &CrosEc) {
662664
println!(" Unknown")
663665
}
664666

667+
#[cfg(windows)]
668+
{
669+
let ssd_cards = ssd_expansion_card::list_framework_ssd_cards();
670+
if !ssd_cards.is_empty() {
671+
println!("SSD Expansion Cards");
672+
for (_path, info) in ssd_cards {
673+
if let Ok(info) = info {
674+
println!(" {}: {}", info.product_name, info.firmware_revision);
675+
}
676+
}
677+
}
678+
}
679+
665680
let has_retimer = matches!(
666681
smbios::get_platform(),
667682
Some(Platform::IntelGen11)

framework_lib/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ pub mod camera;
2121
pub mod inputmodule;
2222
#[cfg(target_os = "linux")]
2323
pub mod nvme;
24+
#[cfg(windows)]
25+
pub mod ssd_expansion_card;
2426
#[cfg(feature = "hidapi")]
2527
pub mod touchpad;
2628
#[cfg(feature = "hidapi")]

0 commit comments

Comments
 (0)