• Home
  • Raw
  • Download

Lines Matching refs:offset

70 static ssize_t pread(int fd, void* data, size_t byte_count, off64_t offset) {  in pread()  argument
81 overlapped.Offset = static_cast<DWORD>(offset); in pread()
82 overlapped.OffsetHigh = static_cast<DWORD>(offset >> 32); in pread()
99 static ssize_t pwrite(int fd, const void* buf, size_t count, off64_t offset) { in pwrite() argument
110 overlapped.Offset = static_cast<DWORD>(offset); in pwrite()
111 overlapped.OffsetHigh = static_cast<DWORD>(offset >> 32); in pwrite()
362 int64_t FdFile::Read(char* buf, int64_t byte_count, int64_t offset) const { in Read()
364 int rc = TEMP_FAILURE_RETRY(pread64(fd_, buf, byte_count, offset)); in Read()
366 int rc = TEMP_FAILURE_RETRY(pread(fd_, buf, byte_count, offset)); in Read()
388 int64_t FdFile::Write(const char* buf, int64_t byte_count, int64_t offset) { in Write() argument
391 int rc = TEMP_FAILURE_RETRY(pwrite64(fd_, buf, byte_count, offset)); in Write()
393 int rc = TEMP_FAILURE_RETRY(pwrite(fd_, buf, byte_count, offset)); in Write()
415 static ssize_t ReadIgnoreOffset(int fd, void *buf, size_t count, off_t offset) { in ReadIgnoreOffset() argument
416 DCHECK_EQ(offset, 0); in ReadIgnoreOffset()
421 static bool ReadFullyGeneric(int fd, void* buffer, size_t byte_count, size_t offset) { in ReadFullyGeneric() argument
424 ssize_t bytes_read = TEMP_FAILURE_RETRY(read_func(fd, ptr, byte_count, offset)); in ReadFullyGeneric()
432 offset += static_cast<size_t>(bytes_read); // Move the offset forward. in ReadFullyGeneric()
441 bool FdFile::PreadFully(void* buffer, size_t byte_count, size_t offset) { in PreadFully() argument
442 return ReadFullyGeneric<pread>(fd_, buffer, byte_count, offset); in PreadFully()
446 bool FdFile::WriteFullyGeneric(const void* buffer, size_t byte_count, size_t offset) { in WriteFullyGeneric() argument
449 DCHECK(kUseOffset || offset == 0u); in WriteFullyGeneric()
453 ? TEMP_FAILURE_RETRY(pwrite(fd_, ptr, byte_count, offset)) in WriteFullyGeneric()
460 offset += static_cast<size_t>(bytes_written); in WriteFullyGeneric()
465 bool FdFile::PwriteFully(const void* buffer, size_t byte_count, size_t offset) { in PwriteFully() argument
466 return WriteFullyGeneric<true>(buffer, byte_count, offset); in PwriteFully()
473 bool FdFile::Copy(FdFile* input_file, int64_t offset, int64_t size) { in Copy() argument
475 off_t off = static_cast<off_t>(offset); in Copy()
477 if (offset < 0 || static_cast<int64_t>(off) != offset || in Copy()
626 size_t offset = 0; in Compare() local
629 if (!PreadFully(&buffer1[0], len, offset)) { in Compare()
632 if (!other->PreadFully(&buffer2[0], len, offset)) { in Compare()
640 offset += len; in Compare()