Lines Matching refs:fd
39 int fd;
45 fd = open("/dev/tty", O_RDONLY, 0);
46 if (fd < 0)
49 keyboard->fd = fd;
51 if (tcgetattr(fd, &keyboard->saved_mode) < 0) {
67 if (tcsetattr(fd, TCSAFLUSH, ¤t_mode) < 0) {
77 close (fd);
89 (void)tcsetattr(keyboard->fd, TCSAFLUSH, &keyboard->saved_mode);
90 (void)close(keyboard->fd);
92 keyboard->fd = -1;
106 cc = read(keyboard->fd, &c, 1);