DevFS device file system

Dynamic device file system. More...

Detailed Description

This file system implementation allows devices to register file names for easier access to device drivers from shell commands etc.

The idea is similar to the /dev directory on Unix.

Files

file  devfs.h
 DevFS public API.
 

Data Structures

struct  devfs
 A device "file" consists of a file name and an opaque pointer to device driver private data. More...
 

Typedefs

typedef struct devfs devfs_t
 DevFS node typedef.
 

Functions

int devfs_register (devfs_t *node)
 Register a node in DevFS. More...
 
int devfs_unregister (devfs_t *node)
 Remove a registration from DevFS. More...
 

Variables

const vfs_file_system_t devfs_file_system
 DevFS file system driver. More...
 

Function Documentation

int devfs_register ( devfs_t node)

The node will immediately become available to vfs_open, if DevFS is already mounted somewhere.

If DevFS is not mounted, the node will be registered and will become available to vfs_open when DevFS is mounted.

Parameters
[in]nodeDevFS node to register
Returns
0 on success
<0 on error
int devfs_unregister ( devfs_t node)

The node will no longer be available to vfs_open, but any already opened FDs will remain open.

Parameters
[in]nodeDevFS node to unregister
Returns
0 on success
<0 on error

Variable Documentation

const vfs_file_system_t devfs_file_system

For use with vfs_mount