]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
refactor: remove /disk/ VFS bypass from syscall.c — route through VFS mount + callbacks
authorTulio A M Mendes <[email protected]>
Fri, 13 Feb 2026 00:43:13 +0000 (21:43 -0300)
committerTulio A M Mendes <[email protected]>
Fri, 13 Feb 2026 02:44:55 +0000 (23:44 -0300)
commitc6bdd11a54619c06292c5f628096741f88d36f2e
tree535013800fe081131e4d266edfb275bf0334a35e
parent54542cc46a070718d6c509c5fe224961a0a81000
refactor: remove /disk/ VFS bypass from syscall.c — route through VFS mount + callbacks

- fs.h: add create/mkdir/unlink/rmdir/rename/truncate callbacks to fs_node_t
- fs.h: add vfs_lookup_parent, vfs_create, vfs_mkdir, vfs_unlink, vfs_rmdir,
  vfs_rename, vfs_truncate prototypes
- fs.c: implement vfs_lookup_parent (split path into parent dir + basename)
  and all VFS mutation wrappers that resolve mount points transparently
- diskfs.c: implement VFS callback wrappers (diskfs_vfs_create, diskfs_vfs_mkdir,
  diskfs_vfs_unlink, diskfs_vfs_rmdir, diskfs_vfs_rename, diskfs_vfs_truncate)
  using parent diskfs_node ino for correct hierarchy scoping
- diskfs.c: wire callbacks into root and subdirectory nodes via diskfs_set_dir_ops
- syscall.c: open/mkdir/unlink/rmdir/rename now use generic VFS functions
  instead of hardcoded path[0]==/ && path[1]==d... checks
- syscall.c: remove #include diskfs.h (only diskfs_link extern remains)

Any filesystem mounted via vfs_mount that implements these callbacks will
now transparently support file creation, directory operations, and rename
without requiring syscall.c modifications.
include/fs.h
src/kernel/diskfs.c
src/kernel/fs.c
src/kernel/syscall.c