HomeCore 0.1.3 (07b5544)
Bare-metal personal computer firmware for Cortex-M
Loading...
Searching...
No Matches
vfs_node Struct Reference

Named entry in the VFS namespace. More...

#include <homecore/vfs/vfs.h>

Collaboration diagram for vfs_node:
[legend]

Data Fields

const char * name
 Canonical absolute path, such as /dev/uart0.
 
vfs_ops_t ops
 Device operations.
 
void * driver_data
 Driver-private state.
 
vfs_node_t * next
 Namespace list link, managed by the VFS.
 
bool is_directory
 The node is a directory.
 
bool is_regular
 The node is a RAM file managed by the VFS.
 
bool is_owned
 The VFS allocated the node and frees it on removal.
 
unsigned size
 RAM file length in bytes.
 

Detailed Description

Named entry in the VFS namespace.

Drivers define device nodes statically, setting name, ops, and optionally driver_data, and pass them to vfs_register_node(). The VFS manages the other fields.

Field Documentation

◆ name

const char* vfs_node::name

Canonical absolute path, such as /dev/uart0.

Must outlive registration.

◆ driver_data

void* vfs_node::driver_data

Driver-private state.

For RAM files, the VFS-owned heap contents.

◆ is_regular

bool vfs_node::is_regular

The node is a RAM file managed by the VFS.

Device drivers leave it false.

◆ is_owned

bool vfs_node::is_owned

The VFS allocated the node and frees it on removal.

Drivers leave it false.

◆ size

unsigned vfs_node::size

RAM file length in bytes.

Unused for devices and directories.


The documentation for this struct was generated from the following file: