summaryrefslogtreecommitdiff
path: root/src/ninep/events.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 22:51:17 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commit4f65855f372186406f4e48708ec3d5eb9aceb6d3 (patch)
tree0498afe611660274f96fbbe6a69c9c041ec6513d /src/ninep/events.zig
parent244704dabbe279d03f1432f8474e985aeb25f2ad (diff)
downloadpardes-4f65855f372186406f4e48708ec3d5eb9aceb6d3.tar.gz
pardes-4f65855f372186406f4e48708ec3d5eb9aceb6d3.zip
log stats 0, and pardes re-pins cloud9 whose 9ns opens such a file direct and nonseekable: fs.md's follow recipe with cat works through a mount
The log stated the length an open would freeze, a length a mount's kernel could take as its end, and a splicing cat read it from the kernel's offset. log now stats 0, as the other streams and generated views do, and the re-pinned cloud9's 9ns opens any file stating 0 FOPEN_DIRECT_IO | FOPEN_NONSEEKABLE. A look at such a file (the mounted index) reads a regular file that will not seek as a stream rather than refusing it as a pipe. selfmount runs the recipe, exec 3<>log; echo follow >&3; cat <&3, through the mount and hears a record made after it started. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/events.zig')
-rw-r--r--src/ninep/events.zig12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/ninep/events.zig b/src/ninep/events.zig
index bacf3ad6..9752e287 100644
--- a/src/ninep/events.zig
+++ b/src/ninep/events.zig
@@ -494,18 +494,6 @@ pub fn writeLog(p: *Pardes, req: Req) Reply {
return .{ .tag = req.tag, .written = @intCast(req.data.len) };
}
-/// The length a stat reports: the text an open would freeze now.
-pub fn logLen(q: *const Queue) u64 {
- var n: u64 = 0;
- var at = q.head;
- while (at + 4 <= q.buf.items.len) {
- const len = std.mem.readInt(u32, q.buf.items[at..][0..4], .little);
- n += len;
- at += 4 + len;
- }
- return n;
-}
-
// ---- per-pane event records ----
pub const max_record_text = 256;