From 2fac6e99418ba83f870b237aa9ebb238f48856b4 Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Sat, 23 Mar 2019 16:25:46 +0800 Subject: [PATCH] Dummy implementation for sys_statfs, sys_flock and sys_mount --- kernel/src/syscall/mod.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/kernel/src/syscall/mod.rs b/kernel/src/syscall/mod.rs index 579c7fd..ad8deb5 100644 --- a/kernel/src/syscall/mod.rs +++ b/kernel/src/syscall/mod.rs @@ -120,6 +120,10 @@ pub fn syscall(id: usize, args: [usize; 6], tf: &mut TrapFrame) -> isize { warn!("sys_fcntl is unimplemented"); Ok(0) } + SYS_FLOCK => { + warn!("sys_flock is unimplemented"); + Ok(0) + } SYS_FSYNC => sys_fsync(args[0]), SYS_FDATASYNC => sys_fdatasync(args[0]), 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"); Ok(0) } + SYS_STATFS => { + warn!("statfs is unimplemented"); + Err(SysError::EACCES) + } SYS_FSTATFS => { - warn!("fstat: not implemented"); + warn!("fstatfs is unimplemented"); Err(SysError::EACCES) } SYS_SETPRIORITY => sys_set_priority(args[0]), // SYS_SETRLIMIT => sys_setrlimit(), 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_GETTID => sys_gettid(), SYS_FUTEX => sys_futex(args[0], args[1] as u32, args[2] as i32, args[3] as *const TimeSpec),