Lines Matching refs:out_fd
621 static void* MapFile(const char* path, int* out_fd, size_t* out_file_size)
625 if (NULL == path || NULL == out_fd || NULL == out_file_size)
630 *out_fd = -1;
634 *out_fd = open(path, O_RDONLY, 0666);
636 if (*out_fd == -1)
641 off_t fsize = lseek(*out_fd, 0, SEEK_END);
649 close(*out_fd);
650 *out_fd = -1;
659 close(*out_fd);
660 *out_fd = -1;
671 bytes_read = pread(*out_fd, temp_result, (size_t)(fsize - total_read), total_read);
676 close(*out_fd);
677 *out_fd = -1;
684 close(*out_fd);
685 *out_fd = -1;