Lines Matching refs:fd
172 int fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0);
173 if (fd == -1) {
183 fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0);
185 if (fd == -1) {
198 close(fd);
208 close(fd);
218 if (write(fd, buf, fileSize) == -1) {
222 close(fd);
228 fchmod(fd, S_IRUSR);
229 close(fd);
237 int fd = open(mFilename.c_str(), O_RDONLY, 0);
238 if (fd == -1) {
247 if (fstat(fd, &statBuf) == -1) {
249 close(fd);
258 close(fd);
263 PROT_READ, MAP_PRIVATE, fd, 0));
267 close(fd);
275 close(fd);
281 close(fd);
290 close(fd);
295 close(fd);