Dummy implementation for sys_statfs, sys_flock and sys_mount

master
Jiajie Chen 6 years ago
parent 705505c543
commit 2fac6e9941

@ -120,6 +120,10 @@ pub fn syscall(id: usize, args: [usize; 6], tf: &mut TrapFrame) -> isize {
warn!("sys_fcntl is unimplemented"); warn!("sys_fcntl is unimplemented");
Ok(0) Ok(0)
} }
SYS_FLOCK => {
warn!("sys_flock is unimplemented");
Ok(0)
}
SYS_FSYNC => sys_fsync(args[0]), SYS_FSYNC => sys_fsync(args[0]),
SYS_FDATASYNC => sys_fdatasync(args[0]), SYS_FDATASYNC => sys_fdatasync(args[0]),
SYS_TRUNCATE => sys_truncate(args[0] as *const u8, args[1]), SYS_TRUNCATE => sys_truncate(args[0] as *const u8, args[1]),
@ -165,13 +169,21 @@ pub fn syscall(id: usize, args: [usize; 6], tf: &mut TrapFrame) -> isize {
warn!("sys_sigaltstack is unimplemented"); warn!("sys_sigaltstack is unimplemented");
Ok(0) Ok(0)
} }
SYS_STATFS => {
warn!("statfs is unimplemented");
Err(SysError::EACCES)
}
SYS_FSTATFS => { SYS_FSTATFS => {
warn!("fstat: not implemented"); warn!("fstatfs is unimplemented");
Err(SysError::EACCES) Err(SysError::EACCES)
} }
SYS_SETPRIORITY => sys_set_priority(args[0]), SYS_SETPRIORITY => sys_set_priority(args[0]),
// SYS_SETRLIMIT => sys_setrlimit(), // SYS_SETRLIMIT => sys_setrlimit(),
SYS_SYNC => sys_sync(), SYS_SYNC => sys_sync(),
SYS_MOUNT => {
warn!("mount is unimplemented");
Err(SysError::EACCES)
}
SYS_REBOOT => sys_reboot(args[0] as u32, args[1] as u32, args[2] as u32, args[3] as *const u8), SYS_REBOOT => sys_reboot(args[0] as u32, args[1] as u32, args[2] as u32, args[3] as *const u8),
SYS_GETTID => sys_gettid(), SYS_GETTID => sys_gettid(),
SYS_FUTEX => sys_futex(args[0], args[1] as u32, args[2] as i32, args[3] as *const TimeSpec), SYS_FUTEX => sys_futex(args[0], args[1] as u32, args[2] as i32, args[3] as *const TimeSpec),

Loading…
Cancel
Save