ld_so: remove access dead code

This commit is contained in:
elle
2025-09-08 20:05:45 +00:00
parent 5d77f617f5
commit a5c41f77d0
+1 -5
View File
@@ -1,5 +1,3 @@
#[cfg(target_os = "redox")]
use crate::header::unistd::{F_OK, R_OK, W_OK, X_OK};
use crate::{
c_str::{CStr, CString},
error::Errno,
@@ -7,8 +5,6 @@ use crate::{
};
pub fn accessible(path: &str, mode: c_int) -> Result<(), Errno> {
let path_c = CString::new(path.as_bytes()).unwrap(); /*.map_err(|err| {
Error::Malformed(format!("invalid path '{}': {}", path, err))
})?;*/
let path_c = CString::new(path.as_bytes()).unwrap();
unsafe { Sys::access(CStr::from_ptr(path_c.as_ptr()), mode) }
}