danos/system/services/fat
Daniel Samson 184d90c2c6
Phase 2b: wire mkdir + unlink through the VFS to runtime.fs
The engine gained mkdir/unlink in Phase 2a; this exposes them as first-class
filesystem operations so programs can use them.

- vfs protocol: two new path-based operations, mkdir and unlink (appended, so
  existing opcodes/offsets are unchanged).
- VFS router: a forwardPath helper relays a path-based op under a mount to its
  backend; the mkdir/unlink cases forward to the mounted filesystem (the flat
  ramfs refuses them — it has no directories).
- fat server: mkdir -> engine.createDirectory, unlink -> engine.removeFile, each
  resolving the parent via a shared splitParent helper (also used by open-create).
- runtime.fs: makeDirectory(path) and remove(path).
- fat-test now exercises the whole path — mkdir /mnt/usb/TESTDIR, create + write +
  read a file inside it, then remove it — behind a new `fat-mutations` QEMU case.

Verified: zig build, zig build test, zig build check-fat-image, and a sequential
QEMU sweep — fat-mount, fat-mutations (mkdir/write/read/unlink through the mount),
vfs, vfs-client-death, log-flush, orderly-shutdown, initial-ramdisk, smoke — green.
2026-07-13 20:12:07 +01:00
..
engine.zig Phase 2a: FAT engine mutations + O_TRUNC (fix the overwrite corruption) 2026-07-13 20:02:01 +01:00
fat-test.zig Phase 2b: wire mkdir + unlink through the VFS to runtime.fs 2026-07-13 20:12:07 +01:00
fat.zig Phase 2b: wire mkdir + unlink through the VFS to runtime.fs 2026-07-13 20:12:07 +01:00
on-disk.zig M6: FAT read/write filesystem server, mounted into the VFS 2026-07-13 15:05:53 +01:00