use crate::host;
use crate::to_str;
use libc::utsname;
use std::io::Error;
pub fn get_os_version() -> Result<String, Error> {
let x = host::get_uname()?;
Ok(to_str(x.version.as_ptr()).to_owned())
}
#[inline]
pub(crate) fn get_os_version_from_uname(uts: &utsname) -> String {
to_str(uts.version.as_ptr()).to_owned()
}