Lines Matching refs:fd
80 static int getFileStartAndLength(int fd, off_t *start_, size_t *length_) in getFileStartAndLength() argument
88 start = lseek(fd, 0L, SEEK_CUR); in getFileStartAndLength()
89 end = lseek(fd, 0L, SEEK_END); in getFileStartAndLength()
90 (void) lseek(fd, start, SEEK_SET); in getFileStartAndLength()
110 int sysFakeMapFile(int fd, MemMapping* pMap) in sysFakeMapFile() argument
122 if (getFileStartAndLength(fd, &start, &length) < 0) in sysFakeMapFile()
126 if (read(fd, memPtr, length) < 0) { in sysFakeMapFile()
128 fd, (int) start, strerror(errno)); in sysFakeMapFile()
150 int sysMapFileInShmemWritableReadOnly(int fd, MemMapping* pMap) in sysMapFileInShmemWritableReadOnly() argument
159 if (getFileStartAndLength(fd, &start, &length) < 0) in sysMapFileInShmemWritableReadOnly()
163 fd, start); in sysMapFileInShmemWritableReadOnly()
166 fd, (int) start, strerror(errno)); in sysMapFileInShmemWritableReadOnly()
182 return sysFakeMapFile(fd, pMap); in sysMapFileInShmemWritableReadOnly()
193 int sysMapFileSegmentInShmem(int fd, off_t start, size_t length, in sysMapFileSegmentInShmem() argument
210 fd, actualStart); in sysMapFileSegmentInShmem()
213 (int) actualLength, fd, (int) actualStart, strerror(errno)); in sysMapFileSegmentInShmem()
316 int sysWriteFully(int fd, const void* buf, size_t count, const char* logMsg) in sysWriteFully() argument
319 ssize_t actual = TEMP_FAILURE_RETRY(write(fd, buf, count)); in sysWriteFully()