mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 02:43:24 +00:00
Modify the userspace read/write usage location
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
af908c29cf
commit
cd2b305fa8
@ -33,7 +33,7 @@ pub fn sys_pread64(
|
||||
let read_len = {
|
||||
let mut buffer = vec![0u8; user_buf_len];
|
||||
let read_len = file.read_at(offset as usize, &mut buffer)?;
|
||||
write_bytes_to_user(user_buf_ptr, &buffer)?;
|
||||
write_bytes_to_user(user_buf_ptr, &mut VmReader::from(buffer.as_slice()))?;
|
||||
read_len
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user