Merge branch 'uname' into 'master'

Implement uname for Redox

See merge request redox-os/relibc!178
This commit is contained in:
Jeremy Soller
2018-11-25 15:25:48 +00:00
6 changed files with 89 additions and 16 deletions
+5 -12
View File
@@ -1,5 +1,6 @@
//! sys/utsname implementation for linux, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/sysutsname.h.html
//! sys/utsname implementation, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/sysutsname.h.html
use platform::{Pal, Sys};
use platform::types::*;
pub const UTSLENGTH: usize = 65;
@@ -14,15 +15,7 @@ pub struct utsname {
pub domainname: [c_char; UTSLENGTH],
}
#[cfg(target_os = "linux")]
mod inner {
use super::*;
use platform::Sys;
#[no_mangle]
pub unsafe extern "C" fn uname(uts: *mut utsname) -> c_int {
Sys::uname(uts)
}
#[no_mangle]
pub unsafe extern "C" fn uname(uts: *mut utsname) -> c_int {
Sys::uname(uts)
}
#[cfg(target_os = "linux")]
pub use self::inner::*;