Module devfs

Source
Expand description

DevFS - Device filesystem implementation

DevFS is a virtual filesystem that automatically exposes all devices registered in the global DeviceManager. When mounted (typically at /dev), it provides device files for all character and block devices that are currently registered with the kernel.

§Features

  • Automatic Device Discovery: Shows all devices from DeviceManager
  • Dynamic Updates: Reflects changes when devices are added/removed
  • Device File Support: Exposes character and block devices as device files
  • Read-only Filesystem: Device files cannot be created/deleted through VFS

§Usage

// Mount devfs at /dev
let vfs = VfsManager::new();
let devfs = DevFS::new();
vfs.mount(devfs, "/dev", 0)?;

// Access device files
let tty_file = vfs.open("/dev/tty0", O_RDWR)?;

Structs§

DevDirectoryObject
A file object for directories in DevFS
DevFS
DevFS - Device filesystem implementation
DevFSDriver
DevFS filesystem driver
DevFileObject
A file object for device files in DevFS
DevNode
A node in the DevFS filesystem

Statics§

__DRIVER_INITCALL__ 🔒

Functions§

register_driver 🔒
Register the DevFS driver with the filesystem driver manager