From c1990b3e6e196ad41379aa432bf3ccca8a65d9f0 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 20 Sep 2026 00:36:50 -0300 Subject: Flatten the 9P control tree and move it out of fs.zig The served tree loses the self/ level: /index /ctl /new /log /screen /listeners /pane//... /os, with /src only in -Dembed-sources=true builds (default off, on for esp32p4). ctl speaks the editor's own language with two lowercase verbs, look TEXT and exec TEXT, plus acme's addr verbs; the new/ factory directory becomes one clone file; cons is gone (exec Msg); name and sel are files; stats report real lengths, modes and mtimes; /log streams pane new/del/rename/save events. The tree code lives in src/ninep/ (tree, pane, ctl, addr, pty, events, screen, sources); fs.zig keeps host access, mounts, resolution and find/grep. Same engine and transports. README (fs-help.txt) and docs rewritten; tests updated and extended. Co-Authored-By: Claude Fable 5.1 --- src/9p.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/9p.zig') diff --git a/src/9p.zig b/src/9p.zig index 2948b9ed..3cffbffc 100644 --- a/src/9p.zig +++ b/src/9p.zig @@ -894,7 +894,7 @@ pub fn Server(comptime fs: type, comptime fid_capacity: usize) type { .qid = qidOf(if (a.node != 0) a.node else f.node, a.dir), .mode = (if (a.dir) dmdir else 0) | @as(u32, a.mode), .atime = 0, - .mtime = 0, + .mtime = if (@hasField(@TypeOf(a), "mtime")) a.mtime else 0, .length = a.size, .name = f.name[0..f.name_len], .uid = who, -- cgit v1.3