Searched defs:ext4_parse_sb (Results 1 - 2 of 2) sorted by relevance

/system/extras/ext4_utils/
H A Dext4_sb.c21 int ext4_parse_sb(struct ext4_super_block *sb, struct fs_info *info) function
/system/extras/libfec/
H A Dfec_open.cpp265 if (ext4_parse_sb(&sb, &info) != 0) {
203 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

Completed in 52 milliseconds