Android-cuttlefish cvd tool
Typedefs | Functions
fec_open.cpp File Reference
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <ext4_utils/ext4_sb.h>
#include <squashfs_utils.h>
#include "avb_utils.h"
#include "fec_private.h"
Include dependency graph for fec_open.cpp:

Typedefs

using size_func = uint64_t(*)(uint64_t size, int roots)
 

Functions

static int find_offset (uint64_t file_size, int roots, uint64_t *offset, size_func get_appr_size, size_func get_real_size)
 
static uint64_t get_verity_size (uint64_t size, int)
 
static int find_verity_offset (fec_handle *f, uint64_t *offset)
 
static int parse_ecc_header (fec_handle *f, uint64_t offset)
 
static int parse_ecc (fec_handle *f, uint64_t offset)
 
static int get_squashfs_size (fec_handle *f, uint64_t *offset)
 
static int get_ext4_size (fec_handle *f, uint64_t *offset)
 
static int get_fs_size (fec_handle *f, uint64_t *offset)
 
static int load_verity (fec_handle *f)
 
static int load_ecc (fec_handle *f)
 
static int get_size (fec_handle *f)
 
static void reset_handle (fec_handle *f)
 
int fec_close (struct fec_handle *f)
 
int fec_verity_get_metadata (struct fec_handle *f, struct fec_verity_metadata *data)
 
int fec_ecc_get_metadata (struct fec_handle *f, struct fec_ecc_metadata *data)
 
int fec_get_status (struct fec_handle *f, struct fec_status *s)
 
int fec_open (struct fec_handle **handle, const char *path, int mode, int flags, int roots)
 

Typedef Documentation

◆ size_func

using size_func = uint64_t (*)(uint64_t size, int roots)

Function Documentation

◆ fec_close()

int fec_close ( struct fec_handle f)

◆ fec_ecc_get_metadata()

int fec_ecc_get_metadata ( struct fec_handle f,
struct fec_ecc_metadata data 
)

◆ fec_get_status()

int fec_get_status ( struct fec_handle f,
struct fec_status s 
)

◆ fec_open()

int fec_open ( struct fec_handle **  handle,
const char *  path,
int  mode,
int  flags,
int  roots 
)

◆ fec_verity_get_metadata()

int fec_verity_get_metadata ( struct fec_handle f,
struct fec_verity_metadata data 
)

◆ find_offset()

static int find_offset ( uint64_t  file_size,
int  roots,
uint64_t *  offset,
size_func  get_appr_size,
size_func  get_real_size 
)
static

◆ find_verity_offset()

static int find_verity_offset ( fec_handle f,
uint64_t *  offset 
)
static

◆ get_ext4_size()

static int get_ext4_size ( fec_handle f,
uint64_t *  offset 
)
static

◆ get_fs_size()

static int get_fs_size ( fec_handle f,
uint64_t *  offset 
)
static

◆ get_size()

static int get_size ( fec_handle f)
static

◆ get_squashfs_size()

static int get_squashfs_size ( fec_handle f,
uint64_t *  offset 
)
static

◆ get_verity_size()

static uint64_t get_verity_size ( uint64_t  size,
int   
)
static

◆ load_ecc()

static int load_ecc ( fec_handle f)
static

◆ load_verity()

static int load_verity ( fec_handle f)
static

◆ parse_ecc()

static int parse_ecc ( fec_handle f,
uint64_t  offset 
)
static

◆ parse_ecc_header()

static int parse_ecc_header ( fec_handle f,
uint64_t  offset 
)
static

◆ reset_handle()

static void reset_handle ( fec_handle f)
static