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

@ -21,7 +21,7 @@ pub fn sys_fstat(fd: FileDesc, stat_buf_ptr: Vaddr, ctx: &Context) -> Result<Sys
};
let stat = Stat::from(file.metadata());
ctx.get_user_space().write_val(stat_buf_ptr, &stat)?;
ctx.user_space().write_val(stat_buf_ptr, &stat)?;
Ok(SyscallReturn::Return(0))
}
@ -46,7 +46,7 @@ pub fn sys_fstatat(
flags: u32,
ctx: &Context,
) -> Result<SyscallReturn> {
let user_space = ctx.get_user_space();
let user_space = ctx.user_space();
let filename = user_space.read_cstring(filename_ptr, MAX_FILENAME_LEN)?;
let flags =
StatFlags::from_bits(flags).ok_or(Error::with_message(Errno::EINVAL, "invalid flags"))?;