Switch almost all of Pal to Rusty error handling.

This commit is contained in:
4lDO2
2024-09-27 10:19:44 +02:00
parent 549bdc5c72
commit 313b32c815
20 changed files with 338 additions and 301 deletions
+5 -2
View File
@@ -1,9 +1,12 @@
use crate::platform::{types::*, Sys};
use crate::{
error::ResultExt,
platform::{types::*, Sys},
};
#[no_mangle]
pub unsafe extern "C" fn ioctl(fd: c_int, request: c_ulong, out: *mut c_void) -> c_int {
// TODO: Somehow support varargs to syscall??
Sys::ioctl(fd, request, out)
Sys::ioctl(fd, request, out).or_minus_one_errno()
}
pub const TCGETS: c_ulong = 0x5401;