Lines Matching refs:fd
19 int fd, ret;
21 if ((fd = mkstemp(temp)) < 0)
25 if (write(fd, magic, sizeof(magic)) != sizeof(magic))
28 if (lseek(fd, 0, SEEK_SET) != 0)
31 if (read(fd, &c, 1) != 1)
37 if (pread(fd, &c, 1, 7) != 1)
43 if (read(fd, &c, 1) != 1)
49 if ((ret = pread(fd, &c, 1, -1)) != -1)
55 if ((ret = pread(fd, &c, 3, LLONG_MAX)) != -1)
61 if (read(fd, &c, 1) != 1)
67 close(fd);
70 fd = open("/dev/tty", O_RDWR);
71 if (fd < 0)
73 else if ((ret = pread(fd, &c, 1, 7)) != -1)