• Home
  • Raw
  • Download

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()
116 int sysLoadFileInShmem(int fd, MemMapping* pMap) in sysLoadFileInShmem() argument
125 if (getFileStartAndLength(fd, &start, &length) < 0) in sysLoadFileInShmem()
132 actual = read(fd, memPtr, length); in sysLoadFileInShmem()
150 int sysFakeMapFile(int fd, MemMapping* pMap) in sysFakeMapFile() argument
162 if (getFileStartAndLength(fd, &start, &length) < 0) in sysFakeMapFile()
166 if (read(fd, memPtr, length) < 0) { in sysFakeMapFile()
168 fd, (int) start, strerror(errno)); in sysFakeMapFile()
186 int sysMapFileInShmemReadOnly(int fd, MemMapping* pMap) in sysMapFileInShmemReadOnly() argument
195 if (getFileStartAndLength(fd, &start, &length) < 0) in sysMapFileInShmemReadOnly()
198 memPtr = mmap(NULL, length, PROT_READ, MAP_FILE | MAP_SHARED, fd, start); in sysMapFileInShmemReadOnly()
201 fd, (int) start, strerror(errno)); in sysMapFileInShmemReadOnly()
210 return sysFakeMapFile(fd, pMap); in sysMapFileInShmemReadOnly()
225 int sysMapFileInShmemWritableReadOnly(int fd, MemMapping* pMap) in sysMapFileInShmemWritableReadOnly() argument
234 if (getFileStartAndLength(fd, &start, &length) < 0) in sysMapFileInShmemWritableReadOnly()
238 fd, start); in sysMapFileInShmemWritableReadOnly()
241 fd, (int) start, strerror(errno)); in sysMapFileInShmemWritableReadOnly()
257 return sysFakeMapFile(fd, pMap); in sysMapFileInShmemWritableReadOnly()
268 int sysMapFileSegmentInShmem(int fd, off_t start, size_t length, in sysMapFileSegmentInShmem() argument
285 fd, actualStart); in sysMapFileSegmentInShmem()
288 (int) actualLength, fd, (int) actualStart, strerror(errno)); in sysMapFileSegmentInShmem()
391 int sysWriteFully(int fd, const void* buf, size_t count, const char* logMsg) in sysWriteFully() argument
394 ssize_t actual = TEMP_FAILURE_RETRY(write(fd, buf, count)); in sysWriteFully()