Lines Matching refs:count

234 static ssize_t ecc_read(fec_handle *f, uint8_t *dest, size_t count,  in ecc_read()  argument
240 check(offset + count <= f->data_size); in ecc_read()
243 debug("[%" PRIu64 ", %" PRIu64 ")", offset, offset + count); in ecc_read()
254 size_t left = count; in ecc_read()
279 return count; in ecc_read()
285 static ssize_t verity_read(fec_handle *f, uint8_t *dest, size_t count, in verity_read() argument
291 check(offset + count <= f->data_size); in verity_read()
295 debug("[%" PRIu64 ", %" PRIu64 ")", offset, offset + count); in verity_read()
306 size_t left = count; in verity_read()
350 offset, offset + count, curr); in verity_read()
354 offset, offset + count, curr); in verity_read()
374 offset, offset + count, curr, curr_offset); in verity_read()
403 return count; in verity_read()
448 ssize_t fec_read(struct fec_handle *f, void *buf, size_t count) in fec_read() argument
450 ssize_t rc = fec_pread(f, buf, count, f->pos); in fec_read()
462 static inline size_t get_max_count(uint64_t offset, size_t count, uint64_t max) in get_max_count() argument
466 } else if (offset > max - count) { in get_max_count()
470 return count; in get_max_count()
475 bool raw_pread(int fd, void *buf, size_t count, uint64_t offset) { in raw_pread() argument
479 size_t remaining = count; in raw_pread()
497 bool raw_pwrite(int fd, const void *buf, size_t count, uint64_t offset) { in raw_pwrite() argument
501 size_t remaining = count; in raw_pwrite()
520 ssize_t fec_pread(struct fec_handle *f, void *buf, size_t count, in fec_pread() argument
526 if (unlikely(offset > UINT64_MAX - count)) { in fec_pread()
533 get_max_count(offset, count, f->data_size), offset, in fec_pread()
538 count = get_max_count(offset, count, f->data_size); in fec_pread()
539 ssize_t rc = process(f, (uint8_t *)buf, count, offset, ecc_read); in fec_pread()
548 count = get_max_count(offset, count, f->size); in fec_pread()
551 if (raw_pread(f->fd, buf, count, offset)) { in fec_pread()
552 return count; in fec_pread()