Minor fixes

This commit is contained in:
Syrus 2019-06-12 00:13:06 +02:00
parent 0b416e14c3
commit 6ce4f5dca4
2 changed files with 4 additions and 3 deletions

View File

@ -74,6 +74,7 @@ use libc::{
SO_REUSEADDR, SO_REUSEADDR,
TIOCGWINSZ, TIOCGWINSZ,
}; };
#[allow(unused_imports)]
use std::ffi::CStr; use std::ffi::CStr;
use wasmer_runtime_core::vm::Ctx; use wasmer_runtime_core::vm::Ctx;
@ -879,7 +880,7 @@ pub fn ___syscall220(ctx: &mut Ctx, _which: i32, mut varargs: VarArgs) -> i32 {
i += 1; i += 1;
} }
*(dirp.add(pos + 19 + i) as *mut i8) = 0 as i8; *(dirp.add(pos + 19 + i) as *mut i8) = 0 as i8;
debug!(" => file {}", CStr::from_ptr((dirp.add(pos + 19) as *const i8)).to_str().unwrap()); debug!(" => file {}", CStr::from_ptr(dirp.add(pos + 19) as *const i8).to_str().unwrap());
} }
pos += offset; pos += offset;
} }

View File

@ -1,6 +1,6 @@
use wasmer_runtime_core::vm::Ctx; use wasmer_runtime_core::vm::Ctx;
pub fn confstr(_ctx: &mut Ctx, _name: i32, _bufPointer: i32, _len: i32) -> i32 { pub fn confstr(_ctx: &mut Ctx, _name: i32, _buf_pointer: i32, _len: i32) -> i32 {
debug!("unistd::confstr({}, {}, {})", _name, _bufPointer, _len); debug!("unistd::confstr({}, {}, {})", _name, _buf_pointer, _len);
0 0
} }