mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 18:03:25 +00:00
Modify the getting-VMAR usages in other syscalls
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
048fd1077c
commit
135100a472
@ -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 [])
|
||||
|
Reference in New Issue
Block a user