Преглед изворни кода

Implement chroot as always returning EPERM.

4lDO2 пре 3 година
родитељ
комит
d35c303ef0
1 измењених фајлова са 7 додато и 2 уклоњено
  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]