Add DEVFS (device filesystem) and integrate FS_DEV into VFS and tools#42
Merged
pradosh-arduino merged 1 commit intomainfrom Apr 4, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
/devfilesystem exposing character-like nodes (null,zero,random,urandom) and block-device nodes for direct access to block devices./dev, list devices, and perform read/write operations via standard VFS calls.Description
FS_DEVtopartition_fs_type_tinahci.hto represent the device filesystem.source/includes/filesystems/layers/dev.hand implementationsource/kernel/C/filesystems/layers/dev.cprovidingdevfs_init,devfs_open,devfs_read,devfs_write,devfs_close, anddevfs_lsand support for both pseudo devices and block-device passthrough.devfsinto the VFS (vfs.c) by handlingFS_DEVinvfs_open,vfs_read,vfs_write,vfs_close,vfs_ls, andvfs_cdpaths and by exposing file position behavior instream.c(fd_file_size,fd_pos_ptr).syscalls.cto handleFS_DEVin stat resolution and directory enumeration (getdents64) to list pseudo devices and block devices.devin shell commands:mount.cnow acceptsdevand callsdevfs_init,umount.chandlesFS_DEVcleanup, andlsblk.cprintsdevfilesystem info and marks it read-only appropriately.proc.handdev.h.Testing
makewhich completed successfully.make test/ VFS smoke tests) includingvfsopen/read/write/ls scenarios for/deventries which completed without failures.getdents/directory enumeration tests that verified/devreturns pseudo nodes and block-device entries, and these tests passed.Codex Task