Skip to content
Snippets Groups Projects
Commit a9db7af7 authored by Bendeguz Pisch's avatar Bendeguz Pisch
Browse files

Add stub for SIOCATMARK command of ioctl.

parent dc9f3e20
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,8 @@ pub const FIONBIO: c_ulong = 0x5421; ...@@ -31,6 +31,8 @@ pub const FIONBIO: c_ulong = 0x5421;
pub const TIOCSPTLCK: c_ulong = 0x4004_5431; pub const TIOCSPTLCK: c_ulong = 0x4004_5431;
pub const TIOCGPTLCK: c_ulong = 0x8004_5439; pub const TIOCGPTLCK: c_ulong = 0x8004_5439;
pub const SIOCATMARK: c_ulong = 0x8905;
// TODO: some of the structs passed as T have padding bytes, so casting to a byte slice is UB // TODO: some of the structs passed as T have padding bytes, so casting to a byte slice is UB
fn dup_read<T>(fd: c_int, name: &str, t: &mut T) -> syscall::Result<usize> { fn dup_read<T>(fd: c_int, name: &str, t: &mut T) -> syscall::Result<usize> {
...@@ -157,6 +159,10 @@ pub unsafe extern "C" fn ioctl(fd: c_int, request: c_ulong, out: *mut c_void) -> ...@@ -157,6 +159,10 @@ pub unsafe extern "C" fn ioctl(fd: c_int, request: c_ulong, out: *mut c_void) ->
eprintln!("TODO: ioctl TCXONC"); eprintln!("TODO: ioctl TCXONC");
0 0
} }
SIOCATMARK => {
eprintln!("TODO: ioctl SIOCATMARK");
0
}
_ => { _ => {
platform::ERRNO.set(errno::EINVAL); platform::ERRNO.set(errno::EINVAL);
-1 -1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment