Browse Source

Implement chroot as always returning EPERM.

4lDO2 3 years ago
parent
commit
d35c303ef0
1 changed files with 7 additions and 2 deletions
  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]