Lines Matching refs:fd
100 bool MemMapping::MapFD(int fd) { in MapFD() argument
102 if (fstat(fd, &sb) == -1) { in MapFD()
103 PLOG(ERROR) << "fstat(" << fd << ") failed"; in MapFD()
107 void* memPtr = mmap(nullptr, sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in MapFD()
109 PLOG(ERROR) << "mmap(" << sb.st_size << ", R, PRIVATE, " << fd << ", 0) failed"; in MapFD()
141 android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(block_map_data.path().c_str(), O_RDONLY))); in MapBlockFile() local
142 if (fd == -1) { in MapBlockFile()
154 void* range_start = mmap(next, range_size, PROT_READ, MAP_PRIVATE | MAP_FIXED, fd, in MapBlockFile()
194 android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(fn.c_str(), O_RDONLY))); in MapFile() local
195 if (fd == -1) { in MapFile()
200 if (!MapFD(fd)) { in MapFile()