Modify the getting-VMAR usages in other syscalls

This commit is contained in:
Chen Chengjun
2025-03-17 10:35:31 +08:00
committed by Tate, Hongliang Tian
parent 048fd1077c
commit 135100a472
18 changed files with 52 additions and 52 deletions

View File

@ -25,11 +25,8 @@ pub fn sys_read(
// the file descriptor. If no errors detected, return 0 successfully.
let read_len = {
if buf_len != 0 {
let mut writer = ctx
.process
.root_vmar()
.vm_space()
.writer(user_buf_addr, buf_len)?;
let user_space = ctx.user_space();
let mut writer = user_space.writer(user_buf_addr, buf_len)?;
file.read(&mut writer)
} else {
file.read_bytes(&mut [])