summaryrefslogtreecommitdiff
path: root/src/ninep/events.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-04 23:52:39 -0300
committerGabriel Schneider <[email protected]>2026-11-05 00:58:29 -0300
commit1c7fd4c48f61695f396765c2f273b560a2e19963 (patch)
tree4b76acd5b742fb2d7cf90dc3c03d6ac26dbbcf2a /src/ninep/events.zig
parentf88ed53afea4fb38bf0b78ecbfbd49edab6c252b (diff)
downloadpardes-1c7fd4c48f61695f396765c2f273b560a2e19963.tar.gz
pardes-1c7fd4c48f61695f396765c2f273b560a2e19963.zip
ninep ctl: a control message's refusal is one refuseQuoting with a tail, so refuseTo and the column ctl's two hand-built refusals, each cut at its own length, go; a captured run's failure is one failedWrite, said three times before; get returns getRefused's words, already in ename, where it copied them out and back; a constant was formatted into a throwaway buffer; writeSettingsOf had no caller; the tests' no-op spawn host is testing.zig's starting, not four copies
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/ninep/events.zig')
-rw-r--r--src/ninep/events.zig6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/ninep/events.zig b/src/ninep/events.zig
index 68f9f3e7..bc43dbfd 100644
--- a/src/ninep/events.zig
+++ b/src/ninep/events.zig
@@ -865,11 +865,7 @@ pub fn writeEvent(p: *Pardes, asked: Req, id: usize) Reply {
else => unreachable,
}
}
- if (p.fs.failure_len > 0) {
- const failure = p.fs.failure[0..p.fs.failure_len];
- return tree.failText(req.tag, ctl.failureErrno(failure), std.fmt.bufPrint(&p.fs.ename, "{s}", .{failure}) catch failure);
- }
- return .{ .tag = req.tag, .written = @intCast(asked.data.len) };
+ return ctl.failedWrite(p, req.tag) orelse .{ .tag = req.tag, .written = @intCast(asked.data.len) };
}
// ---- tests ----