|
|
@ -194,12 +194,20 @@ pub fn syscall(id: usize, args: [usize; 6], tf: &mut TrapFrame) -> isize {
|
|
|
|
warn!("sys_getegid is unimplemented");
|
|
|
|
warn!("sys_getegid is unimplemented");
|
|
|
|
Ok(0)
|
|
|
|
Ok(0)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SYS_SETPGID => {
|
|
|
|
|
|
|
|
warn!("sys_setpgid is unimplemented");
|
|
|
|
|
|
|
|
Ok(0)
|
|
|
|
|
|
|
|
}
|
|
|
|
// 110
|
|
|
|
// 110
|
|
|
|
SYS_GETPPID => sys_getppid(),
|
|
|
|
SYS_GETPPID => sys_getppid(),
|
|
|
|
SYS_SETSID => {
|
|
|
|
SYS_SETSID => {
|
|
|
|
warn!("sys_setsid is unimplemented");
|
|
|
|
warn!("sys_setsid is unimplemented");
|
|
|
|
Ok(0)
|
|
|
|
Ok(0)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SYS_GETPGID => {
|
|
|
|
|
|
|
|
warn!("sys_getpgid is unimplemented");
|
|
|
|
|
|
|
|
Ok(0)
|
|
|
|
|
|
|
|
}
|
|
|
|
SYS_SIGALTSTACK => {
|
|
|
|
SYS_SIGALTSTACK => {
|
|
|
|
warn!("sys_sigaltstack is unimplemented");
|
|
|
|
warn!("sys_sigaltstack is unimplemented");
|
|
|
|
Ok(0)
|
|
|
|
Ok(0)
|
|
|
@ -254,9 +262,17 @@ pub fn syscall(id: usize, args: [usize; 6], tf: &mut TrapFrame) -> isize {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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_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(args[0], args[1] as *const u8, args[2], args[3] as *const u8, args[4]),
|
|
|
|
SYS_LINKAT => sys_linkat(
|
|
|
|
|
|
|
|
args[0],
|
|
|
|
|
|
|
|
args[1] as *const u8,
|
|
|
|
|
|
|
|
args[2],
|
|
|
|
|
|
|
|
args[3] as *const u8,
|
|
|
|
|
|
|
|
args[4],
|
|
|
|
|
|
|
|
),
|
|
|
|
SYS_SYMLINKAT => Err(SysError::EACCES),
|
|
|
|
SYS_SYMLINKAT => Err(SysError::EACCES),
|
|
|
|
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]),
|
|
|
|
// 280
|
|
|
|
// 280
|
|
|
|