Lines Matching refs:fd
144 int fd;
146 fd = open(fn, O_RDONLY);
147 if (fd < 0) return -1;
149 off = lseek64(fd, 0, SEEK_END);
150 close(fd);
159 int fd;
163 fd = open(fn, O_RDONLY);
164 if(fd < 0) return 0;
166 sz = lseek(fd, 0, SEEK_END);
169 if(lseek(fd, 0, SEEK_SET) != 0) goto oops;
174 if(read(fd, data, sz) != sz) goto oops;
175 close(fd);
182 close(fd);
492 int fd;
497 fd = open(fname, O_RDONLY | O_BINARY);
498 if (fd < 0) {
502 s = sparse_file_import_auto(fd, false);