Lines Matching refs:f
24 int parse_vbmeta_from_footer(fec_handle *f, std::vector<uint8_t> *vbmeta) { in parse_vbmeta_from_footer() argument
25 if (f->size <= AVB_FOOTER_SIZE) { in parse_vbmeta_from_footer()
26 debug("file size not large enough to be avb images:" PRIu64, f->size); in parse_vbmeta_from_footer()
31 if (!raw_pread(f->fd, &footer_read, AVB_FOOTER_SIZE, in parse_vbmeta_from_footer()
32 f->size - AVB_FOOTER_SIZE)) { in parse_vbmeta_from_footer()
44 check(vbmeta_offset <= f->size - sizeof(footer) - vbmeta_size); in parse_vbmeta_from_footer()
48 if (!raw_pread(f->fd, vbmeta_data.data(), vbmeta_data.size(), in parse_vbmeta_from_footer()
65 int parse_avb_image(fec_handle *f, const std::vector<uint8_t> &vbmeta) { in parse_avb_image() argument
124 f->size - hashtree_descriptor.fec_size); in parse_avb_image()
126 f->data_size = hashtree_descriptor.fec_offset; in parse_avb_image()
128 f->ecc.blocks = fec_div_round_up(f->data_size, FEC_BLOCKSIZE); in parse_avb_image()
129 f->ecc.rounds = fec_div_round_up(f->ecc.blocks, f->ecc.rsn); in parse_avb_image()
130 f->ecc.size = hashtree_descriptor.fec_size; in parse_avb_image()
131 f->ecc.start = hashtree_descriptor.fec_offset; in parse_avb_image()
133 f->ecc.valid = true; in parse_avb_image()
150 if (hashtree.verify_tree(f, root_hash.data()) != 0) { in parse_avb_image()
156 f->data_size = hashtree.hash_start; in parse_avb_image()
157 f->avb = { in parse_avb_image()