summaryrefslogtreecommitdiff
path: root/src/ninep/events.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 18:23:04 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commit1db5ba2b267f030e2de54a2cb4de9fb155c4139d (patch)
tree11d20f29b4773b92e492d2035e103e38d083007e /src/ninep/events.zig
parent09ef40318a3a3d1b9494e2a5fa41f71363929676 (diff)
downloadpardes-1db5ba2b267f030e2de54a2cb4de9fb155c4139d.tar.gz
pardes-1db5ba2b267f030e2de54a2cb4de9fb155c4139d.zip
Only a write logs an err: a refused open or truncation, create or remove, or a write to pane/new, is its error alone, and every refusal is said in words
The one-failure rule is a write's. A refused remove, pane/new's open refused for want of a slot, and an OTRUNC open's refused truncation (data's after a failed addr) also logged an err, and a reply carrying only an errno reached the client as the C library's text (Operation not permitted). tree.handle now gives such a reply Plan 9's words, chosen so 9ns maps each back to its errno (EPERM's to EACCES, as Plan 9's does), and serveFs logs errs for writes only, not a write to pane/new, which is only read. docs/fs.md and the 9P skill say so, and that a look miss quotes what was written. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/events.zig')
-rw-r--r--src/ninep/events.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ninep/events.zig b/src/ninep/events.zig
index f76a5212..c0bf4a9a 100644
--- a/src/ninep/events.zig
+++ b/src/ninep/events.zig
@@ -174,8 +174,8 @@ pub fn noteMessage(p: *Pardes, serial: u32, said: []const u8) void {
std.fmt.bufPrint(&buf, "msg {d} {s}{s}\n", .{ serial, kept, cut })) catch return, said);
}
-/// Records `err <serial|-> <file>: <why>` for a write or truncation that was
-/// refused or failed: through a mount a shell sees only the errno the
+/// Records `err <serial|-> <file>: <why>` for a write that was refused or
+/// failed: through a mount a shell sees only the errno the
/// kernel mapped the reply to (`Invalid argument`), and here is the reason.
/// The log is the one place for it, as acme's `errors` file takes text and
/// answers nothing: a per-pane readable error file would be a second.