Searched defs:fec_pread (Results 1 - 2 of 2) sorted by last modified time

/system/extras/libfec/
H A Dfec_open.cpp114 call fec_pread to access this data */
237 if (fec_pread(f, buffer, sizeof(buffer), 0) != (ssize_t)sb_size) {
263 if (fec_pread(f, &sb, sizeof(sb), 1024) != sizeof(sb)) {
209 check(offset < UINT64_MAX - FEC_BLOCKSIZE); if (parse_ecc_header(f, offset) == 0) { return 0; } if (parse_ecc_header(f, offset + FEC_BLOCKSIZE - sizeof(fec_header)) == 0) { warn(�); return 0; } return -1; } static int get_squashfs_size(fec_handle *f, uint64_t *offset) { check(f); check(offset); size_t sb_size = squashfs_get_sb_size(); check(sb_size <= SSIZE_MAX); uint8_t buffer[sb_size]; if (fec_pread(f, buffer, sizeof(buffer), 0) != (ssize_t)sb_size) { error(�, strerror(errno)); return -1; } squashfs_info sq; if (squashfs_parse_sb_buffer(buffer, &sq) < 0) { error(�, strerror(errno)); return -1; } *offset = sq.bytes_used_4K_padded; return 0; } static int get_ext4_size(fec_handle *f, uint64_t *offset) { check(f); check(f->size > 1024 + sizeof(ext4_super_block)); check(offset); ext4_super_block sb; if (fec_pread(f, &sb, sizeof(sb), 1024) != sizeof(sb)) { error(�, strerror(errno)); return -1; } fs_info info; info.len = 0; if (ext4_parse_sb(&sb, &info) != 0) { errno = EINVAL; return -1; } *offset = info.len; return 0; } static int get_fs_size(fec_handle *f, uint64_t *offset) { check(f); check(offset); if (f->flags & FEC_FS_EXT4) argument
H A Dfec_read.cpp445 ssize_t rc = fec_pread(f, buf, count, f->pos);
519 ssize_t fec_pread(struct fec_handle *f, void *buf, size_t count, function

Completed in 91 milliseconds