Android-cuttlefish cvd tool
Classes | Macros | Enumerations | Functions | Variables
io.h File Reference
#include <fcntl.h>
#include <inttypes.h>
#include <limits.h>
#include <stdbool.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <crypto_utils/android_pubkey.h>
Include dependency graph for io.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fec_header
 
struct  fec_status
 
struct  fec_ecc_metadata
 
struct  fec_verity_metadata
 

Macros

#define SHA256_DIGEST_LENGTH   32
 
#define FEC_BLOCKSIZE   4096
 
#define FEC_DEFAULT_ROOTS   2
 
#define FEC_MAGIC   0xFECFECFE
 
#define FEC_VERSION   0
 

Enumerations

enum  { FEC_FS_EXT4 = 1 << 0 , FEC_FS_SQUASH = 1 << 1 , FEC_VERITY_DISABLE = 1 << 8 }
 

Functions

struct fec_header __attribute__ ((packed))
 
int fec_open (struct fec_handle **f, const char *path, int mode, int flags, int roots)
 
int fec_close (struct fec_handle *f)
 
int fec_verity_set_status (struct fec_handle *f, bool enabled)
 
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_seek (struct fec_handle *f, int64_t offset, int whence)
 
ssize_t fec_read (struct fec_handle *f, void *buf, size_t count)
 
ssize_t fec_pread (struct fec_handle *f, void *buf, size_t count, uint64_t offset)
 

Variables

uint32_t magic
 
uint32_t version
 
uint32_t size
 
uint32_t roots
 
uint32_t fec_size
 
uint64_t inp_size
 
uint8_t hash [SHA256_DIGEST_LENGTH]
 
struct fec_status __attribute__
 

Macro Definition Documentation

◆ FEC_BLOCKSIZE

#define FEC_BLOCKSIZE   4096

◆ FEC_DEFAULT_ROOTS

#define FEC_DEFAULT_ROOTS   2

◆ FEC_MAGIC

#define FEC_MAGIC   0xFECFECFE

◆ FEC_VERSION

#define FEC_VERSION   0

◆ SHA256_DIGEST_LENGTH

#define SHA256_DIGEST_LENGTH   32

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
FEC_FS_EXT4 
FEC_FS_SQUASH 
FEC_VERITY_DISABLE 

Function Documentation

◆ __attribute__()

struct fec_header __attribute__ ( (packed)  )

◆ 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 **  f,
const char *  path,
int  mode,
int  flags,
int  roots 
)

◆ fec_pread()

ssize_t fec_pread ( struct fec_handle f,
void *  buf,
size_t  count,
uint64_t  offset 
)

◆ fec_read()

ssize_t fec_read ( struct fec_handle f,
void *  buf,
size_t  count 
)

◆ fec_seek()

int fec_seek ( struct fec_handle f,
int64_t  offset,
int  whence 
)

◆ fec_verity_get_metadata()

int fec_verity_get_metadata ( struct fec_handle f,
struct fec_verity_metadata data 
)

◆ fec_verity_set_status()

int fec_verity_set_status ( struct fec_handle f,
bool  enabled 
)

Variable Documentation

◆ __attribute__

struct fec_status __attribute__

◆ fec_size

uint32_t fec_size

◆ hash

uint8_t hash[SHA256_DIGEST_LENGTH]

◆ inp_size

uint64_t inp_size

◆ magic

uint32_t magic

◆ roots

uint32_t roots

◆ size

uint32_t size

◆ version

uint32_t version