18 lines
335 B
C++
18 lines
335 B
C++
#include <luna/Check.h>
|
|
#include <sys/ioctl.h>
|
|
#include <termios.h>
|
|
|
|
extern "C"
|
|
{
|
|
int tcgetattr(int fd, struct termios* termp)
|
|
{
|
|
return ioctl(fd, TCGETS, termp);
|
|
}
|
|
|
|
int tcsetattr(int fd, int act, const struct termios* termp)
|
|
{
|
|
check(act == TCSANOW);
|
|
return ioctl(fd, TCSETS, termp);
|
|
}
|
|
}
|