Framework for exporting system header to user space (#59)
[lunaix-os.git] / lunaix-os / usr / libc / src / termios.c
1 #include <termios.h>
2 #include <sys/ioctl.h>
3
4 int
5 tcgetattr(int fd, struct termios* termios_p) 
6 {
7     return ioctl(fd, TDEV_TCGETATTR, termios_p);
8 }
9
10
11 int
12 tcsendbreak(int fd, int ) 
13 {
14     // TODO
15     return 0;
16 }
17
18 int
19 tcsetattr(int fd, int optional_actions, const struct termios* termios_p)
20 {
21     return ioctl(fd, TDEV_TCSETATTR, termios_p);
22 }