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

Root-confined hosted POSIX adapter for fw_if_fs. More...

#include <stdint.h>
#include "fw_if_fs.h"
Include dependency graph for fw_if_fs_posix.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_posix_cfg_t
 POSIX composition-root settings. More...
struct  fw_fs_posix_state_t
 Caller-owned POSIX adapter state. More...

Functions

ra8_err_t fw_fs_posix_init (fw_fs_t *out, fw_fs_posix_state_t *state, const fw_fs_posix_cfg_t *cfg)
 Open/configure a root-confined POSIX binding.
ra8_err_t fw_fs_posix_deinit (fw_fs_posix_state_t *state)
 Close the root descriptor; no bound operation is valid afterward.

Detailed Description

Root-confined hosted POSIX adapter for fw_if_fs.

Tag
[Ring 4 / Host Port] {World: Host}

The adapter opens one caller-selected directory and resolves every portable path relative to that descriptor. Intermediate components and final file opens use no-follow semantics, so neither .. nor a symlink can escape the bound root. The adapter itself calls no allocator. File streams use raw descriptors and Linux/macOS directory enumeration uses a bounded local kernel-record buffer rather than an opaque C-runtime directory stream. A different hosted kernel is rejected at compile time until its raw directory ABI has a validated decoder; the adapter never falls back to an allocator-backed DIR implementation.

Since
0.1.0

Definition in file fw_if_fs_posix.h.

Function Documentation

◆ fw_fs_posix_deinit()

◆ fw_fs_posix_init()

ra8_err_t fw_fs_posix_init ( fw_fs_t * out,
fw_fs_posix_state_t * state,
const fw_fs_posix_cfg_t * cfg )
nodiscard