Verified Commit eaa031c2 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Fix ioctl on redox

parent a8893338
...@@ -2,6 +2,7 @@ use core::{mem, slice}; ...@@ -2,6 +2,7 @@ use core::{mem, slice};
use syscall; use syscall;
use header::errno; use header::errno;
use header::termios;
use platform; use platform;
use platform::e; use platform::e;
use platform::types::*; use platform::types::*;
...@@ -18,7 +19,7 @@ pub unsafe extern "C" fn ioctl(fd: c_int, request: c_ulong, out: *mut c_void) -> ...@@ -18,7 +19,7 @@ pub unsafe extern "C" fn ioctl(fd: c_int, request: c_ulong, out: *mut c_void) ->
} }
let count = e(syscall::read(dup, unsafe { let count = e(syscall::read(dup, unsafe {
slice::from_raw_parts_mut(out as *mut u8, mem::size_of::<termios>()) slice::from_raw_parts_mut(out as *mut u8, mem::size_of::<termios::termios>())
})); }));
let _ = syscall::close(dup); let _ = syscall::close(dup);
...@@ -35,7 +36,7 @@ pub unsafe extern "C" fn ioctl(fd: c_int, request: c_ulong, out: *mut c_void) -> ...@@ -35,7 +36,7 @@ pub unsafe extern "C" fn ioctl(fd: c_int, request: c_ulong, out: *mut c_void) ->
} }
let count = e(syscall::write(dup, unsafe { let count = e(syscall::write(dup, unsafe {
slice::from_raw_parts(out as *const u8, mem::size_of::<termios>()) slice::from_raw_parts(out as *const u8, mem::size_of::<termios::termios>())
})); }));
let _ = syscall::close(dup); let _ = syscall::close(dup);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment