Rename get_user_space to user_space

This commit is contained in:
Ruihan Li
2024-11-13 23:39:10 +08:00
committed by Tate, Hongliang Tian
parent e6c613f538
commit 96de617ad9
68 changed files with 102 additions and 126 deletions

View File

@ -20,7 +20,7 @@ pub fn sys_getcwd(buf: Vaddr, len: usize, ctx: &Context) -> Result<SyscallReturn
let cwd = CString::new(name)?;
let bytes = cwd.as_bytes_with_nul();
let write_len = len.min(bytes.len());
ctx.get_user_space()
ctx.user_space()
.write_bytes(buf, &mut VmReader::from(&bytes[..write_len]))?;
Ok(SyscallReturn::Return(write_len as _))