]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
refactor: add ioctl/mmap callbacks to fs_node_t, decouple ioctl dispatch
authorTulio A M Mendes <[email protected]>
Thu, 12 Feb 2026 07:11:59 +0000 (04:11 -0300)
committerTulio A M Mendes <[email protected]>
Fri, 13 Feb 2026 02:44:55 +0000 (23:44 -0300)
commitb8667d1f8bcbf0084d1ae4f5f73f9302a1de94c9
tree65c5b8d08d83c683518c39c33a21eac4433a68e1
parent98ac9a0ae1ea557fbe6044d97792e831111e5023
refactor: add ioctl/mmap callbacks to fs_node_t, decouple ioctl dispatch

Added ioctl and mmap function pointers to fs_node_t for generic
device dispatch. Refactored syscall_ioctl_impl to call node->ioctl
instead of hardcoding TTY/PTY dispatch by inode number.

- tty.c: added tty_devfs_ioctl wrapper, set on console/tty nodes
- pty.c: added pty_slave_ioctl_fn wrapper, set on all slave nodes
- syscall.c: ioctl now dispatches generically through node callback

This prepares the VFS for /dev/fb0 and other devices that need
ioctl and mmap support.
include/fs.h
src/kernel/pty.c
src/kernel/syscall.c
src/kernel/tty.c