summaryrefslogtreecommitdiff
path: root/src/fs.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 07:05:46 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commit1b513045336b3c7381c447ffa8c9167f8b1a5a0a (patch)
treebf9377e7178f367c3ad0b35446f4aa9eaf9600d2 /src/fs.zig
parent96383331f09e8af3fa24f767b3c56863309723b8 (diff)
downloadpardes-1b513045336b3c7381c447ffa8c9167f8b1a5a0a.tar.gz
pardes-1b513045336b3c7381c447ffa8c9167f8b1a5a0a.zip
A builtin's Verbose announcement is logged only when it succeeds
A failure said while it ran (Exit's refusal, a Del refused) or later by the host (a Save's write, a Dump's) left `msg N Save` in the log as if it had worked. The announcement's record is remembered and taken back out on either, unless a follower read it already. A refused pane/new logs its err alone, and a failed Dump says its reason in words (`file not found`, not `FileNotFound`) so its msg goes and the err is the one record. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/fs.zig')
-rw-r--r--src/fs.zig10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/fs.zig b/src/fs.zig
index 71e2cbad..6a4c0a33 100644
--- a/src/fs.zig
+++ b/src/fs.zig
@@ -1298,6 +1298,16 @@ pub const Namespace = struct {
header_held: bool = false,
late_failure: [256]u8 = undefined,
late_failure_len: u16 = 0,
+ /// The log record of the last Verbose announcement (`msg <serial>
+ /// <Word>`) and its word: a failure of that builtin, now or when its
+ /// host work fails (a Save, a Dump), takes it back out of the log, so
+ /// an announcement stands only for a builtin that did what it said.
+ announced_seq: ?u64 = null,
+ /// Every failure said (Messages.reportFailure), counted: a builtin
+ /// that said one while it ran failed.
+ failures: u32 = 0,
+ announced_word: [32]u8 = undefined,
+ announced_word_len: u8 = 0,
/// A refusal that quotes the message it refuses, as Plan 9's cmderror
/// does (kernel/misc/parse.c:82); answered at once (src/9p_io.zig).
ename: [320]u8 = undefined,