Explorar o código

Implement chroot as always returning EPERM.

4lDO2 %!s(int64=3) %!d(string=hai) anos
pai
achega
d35c303ef0
Modificáronse 1 ficheiros con 7 adicións e 2 borrados
  1. 7 2
      src/header/unistd/mod.rs

+ 7 - 2
src/header/unistd/mod.rs

@@ -88,9 +88,14 @@ pub unsafe extern "C" fn chdir(path: *const c_char) -> c_int {
     Sys::chdir(path)
 }
 
-// #[no_mangle]
+#[no_mangle]
 pub extern "C" fn chroot(path: *const c_char) -> c_int {
-    unimplemented!();
+    // TODO: Implement
+    unsafe {
+        platform::errno = crate::header::errno::EPERM;
+    }
+
+    -1
 }
 
 #[no_mangle]