Lines Matching defs:fd
48 int fd;59 fd = open(file, O_RDONLY);60 if (fd == -1) {64 if (fstat(fd, &sb) == -1) {66 close(fd);77 close(fd);85 ret = read(fd, buf, sb.st_size);89 close(fd);92 close(fd);117 fd = open(file, O_WRONLY | O_TRUNC);118 if (fd == -1) {123 ret = write(fd, buf, buf_size);124 close(fd);