• Home
  • Raw
  • Download

Lines Matching refs:count

232 static ssize_t ecc_read(fec_handle *f, uint8_t *dest, size_t count,  in ecc_read()  argument
238 check(offset + count <= f->data_size); in ecc_read()
241 debug("[%" PRIu64 ", %" PRIu64 ")", offset, offset + count); in ecc_read()
252 size_t left = count; in ecc_read()
277 return count; in ecc_read()
283 static ssize_t verity_read(fec_handle *f, uint8_t *dest, size_t count, in verity_read() argument
289 check(offset + count <= f->data_size); in verity_read()
293 debug("[%" PRIu64 ", %" PRIu64 ")", offset, offset + count); in verity_read()
304 size_t left = count; in verity_read()
345 offset, offset + count, curr); in verity_read()
349 offset, offset + count, curr); in verity_read()
369 offset, offset + count, curr, curr_offset); in verity_read()
398 return count; in verity_read()
443 ssize_t fec_read(struct fec_handle *f, void *buf, size_t count) in fec_read() argument
445 ssize_t rc = fec_pread(f, buf, count, f->pos); in fec_read()
457 static inline size_t get_max_count(uint64_t offset, size_t count, uint64_t max) in get_max_count() argument
461 } else if (offset > max - count) { in get_max_count()
465 return count; in get_max_count()
470 bool raw_pread(fec_handle *f, void *buf, size_t count, uint64_t offset) in raw_pread() argument
476 size_t remaining = count; in raw_pread()
494 bool raw_pwrite(fec_handle *f, const void *buf, size_t count, uint64_t offset) in raw_pwrite() argument
500 size_t remaining = count; in raw_pwrite()
519 ssize_t fec_pread(struct fec_handle *f, void *buf, size_t count, in fec_pread() argument
525 if (unlikely(offset > UINT64_MAX - count)) { in fec_pread()
532 get_max_count(offset, count, f->data_size), offset, in fec_pread()
537 count = get_max_count(offset, count, f->data_size); in fec_pread()
538 ssize_t rc = process(f, (uint8_t *)buf, count, offset, ecc_read); in fec_pread()
547 count = get_max_count(offset, count, f->size); in fec_pread()
550 if (raw_pread(f, buf, count, offset)) { in fec_pread()
551 return count; in fec_pread()