(path: *const c_char)
| 74 | } |
| 75 | |
| 76 | pub fn sys_chroot(path: *const c_char) -> AxResult<isize> { |
| 77 | let path = vm_load_string(path)?; |
| 78 | debug!("sys_chroot <= path: {path}"); |
| 79 | |
| 80 | let mut fs = FS_CONTEXT.lock(); |
| 81 | let loc = fs.resolve(path)?; |
| 82 | if loc.node_type() != NodeType::Directory { |
| 83 | return Err(AxError::NotADirectory); |
| 84 | } |
| 85 | *fs = FsContext::new(loc); |
| 86 | Ok(0) |
| 87 | } |
| 88 | |
| 89 | pub fn sys_mkdirat(dirfd: i32, path: *const c_char, mode: u32) -> AxResult<isize> { |
| 90 | let path = vm_load_string(path)?; |
no test coverage detected