Rustify Sys::open and some fs:: error handling.

This commit is contained in:
4lDO2
2024-09-07 13:06:23 +02:00
parent b9653e689b
commit 198caa3bc5
13 changed files with 75 additions and 55 deletions
+2 -1
View File
@@ -2,6 +2,7 @@
use crate::{
c_str::CStr,
error::ResultExt,
platform::{types::*, Pal, Sys},
};
@@ -68,7 +69,7 @@ pub unsafe extern "C" fn open(path: *const c_char, oflag: c_int, mut __valist: .
};
let path = CStr::from_ptr(path);
Sys::open(path, oflag, mode)
Sys::open(path, oflag, mode).or_minus_one_errno()
}
#[no_mangle]