(path: *const c_char)
| 51 | } |
| 52 | |
| 53 | pub fn sys_chdir(path: *const c_char) -> AxResult<isize> { |
| 54 | let path = vm_load_string(path)?; |
| 55 | debug!("sys_chdir <= path: {path}"); |
| 56 | |
| 57 | let mut fs = FS_CONTEXT.lock(); |
| 58 | let entry = fs.resolve(path)?; |
| 59 | fs.set_current_dir(entry)?; |
| 60 | Ok(0) |
| 61 | } |
| 62 | |
| 63 | pub fn sys_fchdir(dirfd: i32) -> AxResult<isize> { |
| 64 | debug!("sys_fchdir <= dirfd: {dirfd}"); |
no test coverage detected