Skip to content
Snippets Groups Projects
Commit 4c7d1a56 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Merge branch 'termios_cfsetspeed_shortcut' into 'master'

termios adding cfsetspeed bsd extension which set both __c_ispeed/__c_ospeed fields

See merge request !385
parents 6d6e068b c2b00e8c
No related branches found
No related tags found
1 merge request!385termios adding cfsetspeed bsd extension which set both __c_ispeed/__c_ospeed fields
Pipeline #12067 failed
...@@ -145,6 +145,15 @@ pub unsafe extern "C" fn cfsetospeed(termios_p: *mut termios, speed: speed_t) -> ...@@ -145,6 +145,15 @@ pub unsafe extern "C" fn cfsetospeed(termios_p: *mut termios, speed: speed_t) ->
-1 -1
} }
#[no_mangle]
pub unsafe extern "C" fn cfsetspeed(termios_p: *mut termios, speed: speed_t) -> c_int {
let r = cfsetispeed(termios_p, speed);
if r < 0 {
return r;
}
cfsetospeed(termios_p, speed)
}
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn tcflush(fd: c_int, queue: c_int) -> c_int { pub unsafe extern "C" fn tcflush(fd: c_int, queue: c_int) -> c_int {
sys_ioctl::ioctl(fd, sys_ioctl::TCFLSH, queue as *mut c_void) sys_ioctl::ioctl(fd, sys_ioctl::TCFLSH, queue as *mut c_void)
......
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