Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Aaron Janse
relibc
Commits
eaa031c2
Verified
Commit
eaa031c2
authored
Jan 18, 2019
by
Jeremy Soller
Browse files
Fix ioctl on redox
parent
a8893338
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/header/sys_ioctl/redox.rs
View file @
eaa031c2
...
...
@@ -2,6 +2,7 @@ use core::{mem, slice};
use
syscall
;
use
header
::
errno
;
use
header
::
termios
;
use
platform
;
use
platform
::
e
;
use
platform
::
types
::
*
;
...
...
@@ -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
{
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
);
...
...
@@ -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
{
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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment