|
HomeCore 0.1.3 (07b5544)
Bare-metal personal computer firmware for Cortex-M
|
Named entry in the VFS namespace. More...
#include <homecore/vfs/vfs.h>
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. | |
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.
| const char* vfs_node::name |
Canonical absolute path, such as /dev/uart0.
Must outlive registration.
| void* vfs_node::driver_data |
Driver-private state.
For RAM files, the VFS-owned heap contents.
| bool vfs_node::is_regular |
The node is a RAM file managed by the VFS.
Device drivers leave it false.
| bool vfs_node::is_owned |
The VFS allocated the node and frees it on removal.
Drivers leave it false.
| unsigned vfs_node::size |
RAM file length in bytes.
Unused for devices and directories.