ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
mdl_storage_vfs.h
Go to the documentation of this file.
1
35
36#pragma once
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42#include <stdint.h>
43
45#include "ra8_io_vfs.h"
46
56
72 const char* staging_path,
73 uint64_t total_bytes,
74 const uint8_t sha256[k_ra8_mdl_sha256_bytes]);
75
94
107
139
157 const mdl_storage_vfs_config_t* config,
158 ra8_mdl_storage_iface_t* out_iface);
159
160#ifdef __cplusplus
161}
162#endif
mdl_storage_vfs_limits_t
Fixed capacities owned by one adapter instance.
@ k_mdl_storage_vfs_path_capacity
VFS path incl NUL.
@ k_mdl_storage_vfs_stage_leaf_capacity
Stage leaf incl NUL.
mdl_storage_vfs_state_t
Observable adapter lifecycle state.
@ k_mdl_storage_vfs_ready
Validated and ready to rename.
@ k_mdl_storage_vfs_committed
Destination was published.
@ k_mdl_storage_vfs_idle
No owned private object.
@ k_mdl_storage_vfs_staged
Writer closed; not validated.
@ k_mdl_storage_vfs_writing
Private writer is open.
ra8_err_t(* mdl_storage_vfs_validate_fn)(void *ctx, const char *staging_path, uint64_t total_bytes, const uint8_t sha256[k_ra8_mdl_sha256_bytes])
Validate a closed private artifact before publication.
ra8_err_t mdl_storage_vfs_init(mdl_storage_vfs_t *storage, const mdl_storage_vfs_config_t *config, ra8_mdl_storage_iface_t *out_iface)
Initialise one VFS storage adapter and bind its coordinator interface.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
ra8_io virtual filesystem – mount many volumes, address them by name.
@ k_ra8_mdl_sha256_bytes
SHA-256 digest size in bytes.
Immutable policy copied or retained by an adapter instance.
void * validate_ctx
Validator context.
mdl_storage_vfs_validate_fn validate
Optional artifact validator.
const char * stage_leaf
Reserved sibling staging leaf.
Caller-owned VFS transaction context.
uint64_t bytes_written
Successful appended bytes.
mdl_storage_vfs_validate_fn validate
Optional delegated check.
void * validate_ctx
Delegated check context.
char destination[k_mdl_storage_vfs_path_capacity]
Final path.
char staging_path[k_mdl_storage_vfs_path_capacity]
Private path.
mdl_storage_vfs_state_t state
Transaction lifecycle.
ra8_io_vfs_file_t * file
Open private writer.
char stage_leaf[k_mdl_storage_vfs_stage_leaf_capacity]
Owned leaf.
Opaque, statically-pooled format-neutral file stream.