File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -232,6 +232,30 @@ mod termios {
232232 Ok ( ( ) )
233233 }
234234
235+ #[ pyfunction]
236+ fn tcsendbreak ( fd : i32 , duration : i32 , vm : & VirtualMachine ) -> PyResult < ( ) > {
237+ termios:: tcsendbreak ( fd, duration) . map_err ( |e| termios_error ( e, vm) ) ?;
238+ Ok ( ( ) )
239+ }
240+
241+ #[ pyfunction]
242+ fn tcdrain ( fd : i32 , vm : & VirtualMachine ) -> PyResult < ( ) > {
243+ termios:: tcdrain ( fd) . map_err ( |e| termios_error ( e, vm) ) ?;
244+ Ok ( ( ) )
245+ }
246+
247+ #[ pyfunction]
248+ fn tcflush ( fd : i32 , queue : i32 , vm : & VirtualMachine ) -> PyResult < ( ) > {
249+ termios:: tcflush ( fd, queue) . map_err ( |e| termios_error ( e, vm) ) ?;
250+ Ok ( ( ) )
251+ }
252+
253+ #[ pyfunction]
254+ fn tcflow ( fd : i32 , action : i32 , vm : & VirtualMachine ) -> PyResult < ( ) > {
255+ termios:: tcflow ( fd, action) . map_err ( |e| termios_error ( e, vm) ) ?;
256+ Ok ( ( ) )
257+ }
258+
235259 fn termios_error ( err : std:: io:: Error , vm : & VirtualMachine ) -> PyBaseExceptionRef {
236260 vm. new_exception (
237261 error_type ( vm) ,
You can’t perform that action at this time.
0 commit comments