devela::_dep::nc

Function uname

pub unsafe fn uname(buf: &mut new_utsname_t) -> Result<(), i32> 
Available on crate feature dep_nc only.
Expand description

Get name and information about current kernel.

§Examples

let mut buf = nc::utsname_t::default();
let ret = unsafe { nc::uname(&mut buf) };
assert!(ret.is_ok());
assert!(!buf.sysname.is_empty());
assert!(!buf.machine.is_empty());