1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-31 13:07:46 +00:00

os::errno returns uint now

This commit is contained in:
Michael Gehring 2014-11-09 16:13:32 +01:00
parent 5e3183371b
commit f3fc1b72ff
3 changed files with 4 additions and 4 deletions

View file

@ -186,7 +186,7 @@ unsafe fn get_group_list_internal(name: *const c_char, gid: gid_t, groups: *mut
}
}
pub fn get_groups() -> Result<Vec<gid_t>, int> {
pub fn get_groups() -> Result<Vec<gid_t>, uint> {
let ngroups = unsafe { getgroups(0, null_mut()) };
if ngroups == -1 {
return Err(os::errno());
@ -210,7 +210,7 @@ pub fn group(possible_pw: Option<c_passwd>, nflag: bool) {
match groups {
Err(errno) =>
crash!(1, "failed to get group list (errno={:d})", errno),
crash!(1, "failed to get group list (errno={:u})", errno),
Ok(groups) => {
for &g in groups.iter() {
if nflag {

View file

@ -345,7 +345,7 @@ fn id_print(possible_pw: Option<c_passwd>,
};
let groups = groups.unwrap_or_else(|errno| {
crash!(1, "failed to get group list (errno={:d})", errno);
crash!(1, "failed to get group list (errno={:u})", errno);
});
if possible_pw.is_some() {

View file

@ -69,7 +69,7 @@ pub fn uumain(args: Vec<String>) -> int {
f.with_c_str(|name| {
let err = unsafe { mkfifo(name, mode) };
if err == -1 {
show_error!("creating '{}': {}", f, os::error_string(os::errno() as uint));
show_error!("creating '{}': {}", f, os::error_string(os::errno()));
exit_status = 1;
}
});