Skip to content

Commit

Permalink
Merge pull request #59 from FrameworkComputer/smbios-match-framework
Browse files Browse the repository at this point in the history
smbios: is_framework if any of our platforms match
  • Loading branch information
JohnAZoidberg authored Oct 17, 2024
2 parents 8ffc2f9 + 15fbc75 commit 235d6af
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions framework_lib/src/commandline/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,12 @@ fn smbios_info() {
println!(" Family: {}", family);
}
}
DefinedStruct::SystemChassisInformation(data) => {
println!("System Chassis Information");
if let Some(chassis) = data.chassis_type() {
println!(" Type: {}", chassis);
}
}
DefinedStruct::BaseBoardInformation(data) => {
println!("BaseBoard Information");
if let Some(version) = dmidecode_string_val(&data.version()) {
Expand Down
5 changes: 5 additions & 0 deletions framework_lib/src/smbios.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ pub fn is_framework() -> bool {
return true;
}

// If we match any of our platforms, it's our platform
if get_platform().is_some() {
return true;
}

// Don't need to parse SMBIOS on FreeBSD, can just read kenv
#[cfg(target_os = "freebsd")]
if let Ok(maker) = kenv_get("smbios.system.maker") {
Expand Down

0 comments on commit 235d6af

Please sign in to comment.