Skip to content

Commit 235d6af

Browse files
Merge pull request #59 from FrameworkComputer/smbios-match-framework
smbios: is_framework if any of our platforms match
2 parents 8ffc2f9 + 15fbc75 commit 235d6af

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

framework_lib/src/commandline/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,12 @@ fn smbios_info() {
10211021
println!(" Family: {}", family);
10221022
}
10231023
}
1024+
DefinedStruct::SystemChassisInformation(data) => {
1025+
println!("System Chassis Information");
1026+
if let Some(chassis) = data.chassis_type() {
1027+
println!(" Type: {}", chassis);
1028+
}
1029+
}
10241030
DefinedStruct::BaseBoardInformation(data) => {
10251031
println!("BaseBoard Information");
10261032
if let Some(version) = dmidecode_string_val(&data.version()) {

framework_lib/src/smbios.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ pub fn is_framework() -> bool {
5050
return true;
5151
}
5252

53+
// If we match any of our platforms, it's our platform
54+
if get_platform().is_some() {
55+
return true;
56+
}
57+
5358
// Don't need to parse SMBIOS on FreeBSD, can just read kenv
5459
#[cfg(target_os = "freebsd")]
5560
if let Ok(maker) = kenv_get("smbios.system.maker") {

0 commit comments

Comments
 (0)