Lines Matching refs:fd
56 int fd;
63 fd = open(name, O_RDONLY);
64 if (fd >= 0) {
66 return fd;
82 int fd;
98 fd = open(file, O_RDONLY, 0);
99 if (fd < 0) {
104 if (fstat(fd, &stat) < 0) {
110 close(fd);
112 fd = choose_file(file);
113 if (fd < 0) {
118 if (fstat(fd, &stat) < 0) {
130 if (read(fd, buffer, stat.st_size) < 0) {
138 close(fd);