mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-12 22:05:33 +00:00
Move emscripten ___syscall221 to the unix implementation
This commit is contained in:
parent
72a80a6122
commit
680b833e94
@ -24,7 +24,6 @@ use libc::{
|
||||
close,
|
||||
dup2,
|
||||
exit,
|
||||
fcntl,
|
||||
fstat,
|
||||
getpid,
|
||||
// readlink,
|
||||
@ -596,25 +595,6 @@ pub fn ___syscall218(_ctx: &mut Ctx, _one: i32, _two: i32) -> i32 {
|
||||
-1
|
||||
}
|
||||
|
||||
// fcntl64
|
||||
pub fn ___syscall221(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> c_int {
|
||||
debug!("emscripten::___syscall221 (fcntl64) {}", _which);
|
||||
// fcntl64
|
||||
let fd: i32 = varargs.get(ctx);
|
||||
let cmd: i32 = varargs.get(ctx);
|
||||
let arg: i32 = varargs.get(ctx);
|
||||
// (FAPPEND - 0x08
|
||||
// |FASYNC - 0x40
|
||||
// |FFSYNC - 0x80
|
||||
// |FNONBLOCK - 0x04
|
||||
let ret = unsafe { fcntl(fd, cmd, arg) };
|
||||
debug!("=> fd: {}, cmd: {} = {}", fd, cmd, ret);
|
||||
if ret == -1 {
|
||||
debug!("=> last os error: {}", Error::last_os_error(),);
|
||||
}
|
||||
ret
|
||||
}
|
||||
|
||||
pub fn ___syscall268(_ctx: &mut Ctx, _one: i32, _two: i32) -> i32 {
|
||||
debug!("emscripten::___syscall268");
|
||||
-1
|
||||
|
@ -1076,6 +1076,24 @@ pub fn ___syscall220(ctx: &mut Ctx, _which: i32, mut varargs: VarArgs) -> i32 {
|
||||
pos as i32
|
||||
}
|
||||
|
||||
// fcntl64
|
||||
pub fn ___syscall221(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> c_int {
|
||||
debug!("emscripten::___syscall221 (fcntl64) {}", _which);
|
||||
let fd: i32 = varargs.get(ctx);
|
||||
let cmd: i32 = varargs.get(ctx);
|
||||
let arg: i32 = varargs.get(ctx);
|
||||
// (FAPPEND - 0x08
|
||||
// |FASYNC - 0x40
|
||||
// |FFSYNC - 0x80
|
||||
// |FNONBLOCK - 0x04
|
||||
let ret = unsafe { fcntl(fd, cmd, arg) };
|
||||
debug!("=> fd: {}, cmd: {} = {}", fd, cmd, ret);
|
||||
if ret == -1 {
|
||||
debug!("=> last os error: {}", Error::last_os_error(),);
|
||||
}
|
||||
ret
|
||||
}
|
||||
|
||||
/// fallocate
|
||||
pub fn ___syscall324(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> c_int {
|
||||
debug!("emscripten::___syscall324 (fallocate) {}", _which);
|
||||
|
@ -291,6 +291,12 @@ pub fn ___syscall220(_ctx: &mut Ctx, _one: i32, _two: i32) -> i32 {
|
||||
-1
|
||||
}
|
||||
|
||||
// fcntl64
|
||||
pub fn ___syscall221(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> c_int {
|
||||
debug!("emscripten::___syscall221 (fcntl64) {}", _which);
|
||||
-1
|
||||
}
|
||||
|
||||
/// fchown
|
||||
pub fn ___syscall207(_ctx: &mut Ctx, _which: c_int, _varargs: VarArgs) -> c_int {
|
||||
debug!("emscripten::___syscall207 (fchown) {}", _which);
|
||||
|
Loading…
Reference in New Issue
Block a user