Fix iovec size for MIPSn32.

master
Yuhao Zhou 6 years ago
parent bfa4c9d47e
commit 9075a172ad

@ -1074,6 +1074,9 @@ pub struct IoVec {
/// Starting address
base: *mut u8,
/// Number of bytes to transfer
#[cfg(target_arch = "mips")]
len: u32,
#[cfg(not(target_arch = "mips"))]
len: u64,
}

@ -319,6 +319,9 @@ pub fn syscall(id: usize, args: [usize; 6], tf: &mut TrapFrame) -> isize {
#[cfg(target_arch = "mips")]
fn mips_syscall(id: usize, args: [usize; 6], tf: &mut TrapFrame) -> Option<SysResult> {
let ret = match id {
SYS_OPEN => sys_open(args[0] as *const u8, args[1], args[2]),
SYS_DUP2 => sys_dup2(args[0], args[1]),
SYS_MMAP2 => sys_mmap(args[0], args[1], args[2], args[3], args[4], args[5] * 4096),
SYS_SET_THREAD_AREA => {
extern "C" {
fn _cur_tls();

Loading…
Cancel
Save