summaryrefslogtreecommitdiff
path: root/src/termios
diff options
context:
space:
mode:
Diffstat (limited to 'src/termios')
-rw-r--r--src/termios/tcdrain.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/termios/tcdrain.c b/src/termios/tcdrain.c
index 9ff1ecd5..6e43afb7 100644
--- a/src/termios/tcdrain.c
+++ b/src/termios/tcdrain.c
@@ -1,13 +1,9 @@
#include <termios.h>
#include <sys/ioctl.h>
#include "libc.h"
+#include "syscall.h"
int tcdrain(int fd)
{
- int ret;
- CANCELPT_BEGIN;
- ret = ioctl(fd, TCSBRK, 1);
- CANCELPT_TRY;
- CANCELPT_END;
- return ret;
+ return syscall_cp(SYS_ioctl, fd, TCSBRK, 1);
}