• Home
  • Raw
  • Download

Lines Matching refs:byte_count

192 int64_t FdFile::Read(char* buf, int64_t byte_count, int64_t offset) const {  in Read()  argument
194 int rc = TEMP_FAILURE_RETRY(pread64(fd_, buf, byte_count, offset)); in Read()
196 int rc = TEMP_FAILURE_RETRY(pread(fd_, buf, byte_count, offset)); in Read()
218 int64_t FdFile::Write(const char* buf, int64_t byte_count, int64_t offset) { in Write() argument
221 int rc = TEMP_FAILURE_RETRY(pwrite64(fd_, buf, byte_count, offset)); in Write()
223 int rc = TEMP_FAILURE_RETRY(pwrite(fd_, buf, byte_count, offset)); in Write()
251 static bool ReadFullyGeneric(int fd, void* buffer, size_t byte_count, size_t offset) { in ReadFullyGeneric() argument
253 while (byte_count > 0) { in ReadFullyGeneric()
254 ssize_t bytes_read = TEMP_FAILURE_RETRY(read_func(fd, ptr, byte_count, offset)); in ReadFullyGeneric()
260 byte_count -= bytes_read; // Reduce the number of remaining bytes. in ReadFullyGeneric()
267 bool FdFile::ReadFully(void* buffer, size_t byte_count) { in ReadFully() argument
268 return ReadFullyGeneric<ReadIgnoreOffset>(fd_, buffer, byte_count, 0); in ReadFully()
271 bool FdFile::PreadFully(void* buffer, size_t byte_count, size_t offset) { in PreadFully() argument
272 return ReadFullyGeneric<pread>(fd_, buffer, byte_count, offset); in PreadFully()
276 bool FdFile::WriteFullyGeneric(const void* buffer, size_t byte_count, size_t offset) { in WriteFullyGeneric() argument
281 while (byte_count > 0) { in WriteFullyGeneric()
283 ? TEMP_FAILURE_RETRY(pwrite(fd_, ptr, byte_count, offset)) in WriteFullyGeneric()
284 : TEMP_FAILURE_RETRY(write(fd_, ptr, byte_count)); in WriteFullyGeneric()
288 byte_count -= bytes_written; // Reduce the number of remaining bytes. in WriteFullyGeneric()
295 bool FdFile::PwriteFully(const void* buffer, size_t byte_count, size_t offset) { in PwriteFully() argument
296 return WriteFullyGeneric<true>(buffer, byte_count, offset); in PwriteFully()
299 bool FdFile::WriteFully(const void* buffer, size_t byte_count) { in WriteFully() argument
300 return WriteFullyGeneric<false>(buffer, byte_count, 0u); in WriteFully()