mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 09:53:24 +00:00
Replace old user space read/write with new APIs
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
7ade2fcb57
commit
75da7fd30e
@ -8,7 +8,6 @@ use crate::{
|
||||
utils::{InodeMode, PATH_MAX},
|
||||
},
|
||||
prelude::*,
|
||||
util::read_cstring_from_user,
|
||||
};
|
||||
|
||||
pub fn sys_fchmod(fd: FileDesc, mode: u16) -> Result<SyscallReturn> {
|
||||
@ -32,7 +31,7 @@ pub fn sys_fchmodat(
|
||||
mode: u16,
|
||||
/* flags: u32, */
|
||||
) -> Result<SyscallReturn> {
|
||||
let path = read_cstring_from_user(path_ptr, PATH_MAX)?;
|
||||
let path = CurrentUserSpace::get().read_cstring(path_ptr, PATH_MAX)?;
|
||||
debug!("dirfd = {}, path = {:?}, mode = 0o{:o}", dirfd, path, mode,);
|
||||
|
||||
let current = current!();
|
||||
|
Reference in New Issue
Block a user