Lines Matching refs:byte_count
138 int64_t FdFile::Read(char* buf, int64_t byte_count, int64_t offset) const { in Read() argument
140 int rc = TEMP_FAILURE_RETRY(pread64(fd_, buf, byte_count, offset)); in Read()
142 int rc = TEMP_FAILURE_RETRY(pread(fd_, buf, byte_count, offset)); in Read()
163 int64_t FdFile::Write(const char* buf, int64_t byte_count, int64_t offset) { in Write() argument
165 int rc = TEMP_FAILURE_RETRY(pwrite64(fd_, buf, byte_count, offset)); in Write()
167 int rc = TEMP_FAILURE_RETRY(pwrite(fd_, buf, byte_count, offset)); in Write()
187 static bool ReadFullyGeneric(int fd, void* buffer, size_t byte_count, size_t offset) { in ReadFullyGeneric() argument
189 while (byte_count > 0) { in ReadFullyGeneric()
190 ssize_t bytes_read = TEMP_FAILURE_RETRY(read_func(fd, ptr, byte_count, offset)); in ReadFullyGeneric()
196 byte_count -= bytes_read; // Reduce the number of remaining bytes. in ReadFullyGeneric()
203 bool FdFile::ReadFully(void* buffer, size_t byte_count) { in ReadFully() argument
204 return ReadFullyGeneric<ReadIgnoreOffset>(fd_, buffer, byte_count, 0); in ReadFully()
207 bool FdFile::PreadFully(void* buffer, size_t byte_count, size_t offset) { in PreadFully() argument
208 return ReadFullyGeneric<pread>(fd_, buffer, byte_count, offset); in PreadFully()
211 bool FdFile::WriteFully(const void* buffer, size_t byte_count) { in WriteFully() argument
214 while (byte_count > 0) { in WriteFully()
215 ssize_t bytes_written = TEMP_FAILURE_RETRY(write(fd_, ptr, byte_count)); in WriteFully()
219 byte_count -= bytes_written; // Reduce the number of remaining bytes. in WriteFully()