master
Jiajie Chen 6 years ago
parent 8090e154c1
commit 1fd0060a1a

@ -230,7 +230,7 @@ pub fn syscall(id: usize, args: [usize; 6], tf: &mut TrapFrame) -> isize {
} }
SYS_SETPRIORITY => sys_set_priority(args[0]), SYS_SETPRIORITY => sys_set_priority(args[0]),
SYS_PRCTL => { SYS_PRCTL => {
warn!("ptctl is unimplemented"); warn!("prctl is unimplemented");
Ok(0) Ok(0)
} }
// SYS_SETRLIMIT => sys_setrlimit(), // SYS_SETRLIMIT => sys_setrlimit(),
@ -268,19 +268,12 @@ pub fn syscall(id: usize, args: [usize; 6], tf: &mut TrapFrame) -> isize {
SYS_MKDIRAT => sys_mkdirat(args[0], args[1] as *const u8, args[2]), SYS_MKDIRAT => sys_mkdirat(args[0], args[1] as *const u8, args[2]),
// SYS_MKNODAT => sys_mknod(), // SYS_MKNODAT => sys_mknod(),
// 260 // 260
SYS_FCHMODAT => {
warn!("sys_fchmodat is unimplemented");
Ok(0)
}
SYS_FCHOWNAT => { SYS_FCHOWNAT => {
warn!("sys_fchownat is unimplemented"); warn!("sys_fchownat is unimplemented");
Ok(0) Ok(0)
} }
SYS_NEWFSTATAT => sys_fstatat(args[0], args[1] as *const u8, args[2] as *mut Stat, args[3]), SYS_NEWFSTATAT => sys_fstatat(args[0], args[1] as *const u8, args[2] as *mut Stat, args[3]),
SYS_UNLINKAT => sys_unlinkat(args[0], args[1] as *const u8, args[2]), SYS_UNLINKAT => sys_unlinkat(args[0], args[1] as *const u8, args[2]),
SYS_READLINKAT => {
sys_readlinkat(args[0], args[1] as *const u8, args[2] as *mut u8, args[3])
}
SYS_RENAMEAT => sys_renameat(args[0], args[1] as *const u8, args[2], args[3] as *const u8), SYS_RENAMEAT => sys_renameat(args[0], args[1] as *const u8, args[2], args[3] as *const u8),
SYS_LINKAT => sys_linkat( SYS_LINKAT => sys_linkat(
args[0], args[0],
@ -290,6 +283,13 @@ pub fn syscall(id: usize, args: [usize; 6], tf: &mut TrapFrame) -> isize {
args[4], args[4],
), ),
SYS_SYMLINKAT => Err(SysError::EACCES), SYS_SYMLINKAT => Err(SysError::EACCES),
SYS_READLINKAT => {
sys_readlinkat(args[0], args[1] as *const u8, args[2] as *mut u8, args[3])
}
SYS_FCHMODAT => {
warn!("sys_fchmodat is unimplemented");
Ok(0)
}
SYS_FACCESSAT => sys_faccessat(args[0], args[1] as *const u8, args[2], args[3]), SYS_FACCESSAT => sys_faccessat(args[0], args[1] as *const u8, args[2], args[3]),
SYS_PPOLL => sys_ppoll(args[0] as *mut PollFd, args[1], args[2] as *const TimeSpec), // ignore sigmask SYS_PPOLL => sys_ppoll(args[0] as *mut PollFd, args[1], args[2] as *const TimeSpec), // ignore sigmask
// 280 // 280

Loading…
Cancel
Save