summaryrefslogtreecommitdiff
path: root/src/termios/tcgetattr.c
blob: 0f74be5c26437909ce810774c69b606766b430a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <termios.h>
#include "_termios.h"

int tcgetattr(int fildes, struct termios *termios_p)
{
	int ret = -1;
	struct kernel_termios kt;
	utok(kt, *termios_p);
	ret = ioctl(fildes, TCGETS, &kt);
	ktou(*termios_p, kt);
	return ret;
}

/*
POSIX(1)
*/