diff --git a/os_info/src/netbsd/mod.rs b/os_info/src/netbsd/mod.rs index 6f4651b..586a6aa 100644 --- a/os_info/src/netbsd/mod.rs +++ b/os_info/src/netbsd/mod.rs @@ -7,7 +7,7 @@ use crate::{architecture, bitness, uname::uname, Info, Type, Version}; pub fn current_platform() -> Info { trace!("netbsd::current_platform is called"); - let version = uname("-o") + let version = uname("-s") .map(Version::from_string) .unwrap_or_else(|| Version::Unknown); diff --git a/os_info/src/uname.rs b/os_info/src/uname.rs index 242c8ad..88a6ed9 100644 --- a/os_info/src/uname.rs +++ b/os_info/src/uname.rs @@ -26,7 +26,7 @@ mod tests { #[test] fn uname_nonempty() { - let val = uname().expect("uname failed"); + let val = uname("-s").expect("uname failed"); assert!(!val.is_empty()); } }