ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
fw_if_fs_ra8_vfs.h File Reference

Firmware filesystem-port adapter over ra8_io_vfs and ra8_fs. More...

#include <stdint.h>
#include "fw_if_fs.h"
#include "ra8_fs.h"
#include "ra8_io_vfs.h"
Include dependency graph for fw_if_fs_ra8_vfs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  fw_fs_ra8_vfs_cfg_t
 Composition-root configuration for one firmware filesystem binding. More...
struct  fw_fs_ra8_vfs_state_t
 Caller-owned adapter context. More...

Enumerations

enum  fw_fs_ra8_vfs_limits_t : uint16_t { k_fw_fs_ra8_vfs_full_path_cap }
 Fixed storage used to prefix one portable path with a mount name. More...

Functions

ra8_err_t fw_fs_ra8_vfs_init (fw_fs_t *out, fw_fs_ra8_vfs_state_t *state, const fw_fs_ra8_vfs_cfg_t *cfg)
 Bind a live named VFS mount into the portable filesystem facade.

Detailed Description

Firmware filesystem-port adapter over ra8_io_vfs and ra8_fs.

Tag
[Ring 4 / PAL] {World: NS}

The composition root binds one already-mounted VFS volume as the portable root. Portable /books/a.cbz becomes mount:/books/a.cbz; portable code never sees the mount name or underlying SD/RAM/flash medium.

FAT/exFAT has no symlinks, so traversal is structurally absent after the generic lexical path guard. ra8_fs_close commits filesystem metadata but the current stack exposes neither an explicit medium flush nor crash-atomic replacement. The adapter therefore does not advertise durable sync or atomic replacement. Its staged transaction safely publishes a new name; replacing an existing destination is rejected without changing it.

Since
0.1.0

Definition in file fw_if_fs_ra8_vfs.h.

Enumeration Type Documentation

◆ fw_fs_ra8_vfs_limits_t

enum fw_fs_ra8_vfs_limits_t : uint16_t

Fixed storage used to prefix one portable path with a mount name.

Enumerator
k_fw_fs_ra8_vfs_full_path_cap 

name: + path + NUL.

Definition at line 39 of file fw_if_fs_ra8_vfs.h.

Function Documentation

◆ fw_fs_ra8_vfs_init()

ra8_err_t fw_fs_ra8_vfs_init ( fw_fs_t * out,
fw_fs_ra8_vfs_state_t * state,
const fw_fs_ra8_vfs_cfg_t * cfg )
nodiscard

Bind a live named VFS mount into the portable filesystem facade.

Parameters
[out]outComplete portable facade.
[in,out]stateCaller-owned adapter state, retained by out.
[in]cfgLive mount, registered name, and media property.

Definition at line 960 of file fw_if_fs_ra8_vfs.c.

References fw_fs_bind(), ra8_fs_mount_t::in_use, internal_capabilities(), internal_dir_requirements(), internal_mount_name(), k_ra8_err_not_initialized, k_ra8_err_null_ptr, k_ra8_ok, memset(), fw_fs_ra8_vfs_cfg_t::mount, fw_fs_ra8_vfs_state_t::mount, fw_fs_ra8_vfs_cfg_t::mount_name, fw_fs_ra8_vfs_cfg_t::removable_media, fw_fs_ra8_vfs_state_t::removable_media, s_namespace_iface, s_stream_iface, and s_transaction_iface.