summaryrefslogtreecommitdiff
path: root/src/ninep/cols.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 01:44:13 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:15 -0300
commit8322d6507a854fc41bba42b9e8b8672d33cfe18b (patch)
treec829f96c9447cf968cc5e015e75c4978ec233dae /src/ninep/cols.zig
parent4a662c32888ed055b3e42faa5afc31dcaeb09fc4 (diff)
downloadpardes-8322d6507a854fc41bba42b9e8b8672d33cfe18b.tar.gz
pardes-8322d6507a854fc41bba42b9e8b8672d33cfe18b.zip
An error on a column's ctl, exec or rmdir names that file in the log
noteError named every column node col/<serial>/tag, so a refused ctl write or rmdir pointed at the tag. It now names col/<serial>/ctl, /exec, /tag or the directory itself. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/cols.zig')
-rw-r--r--src/ninep/cols.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ninep/cols.zig b/src/ninep/cols.zig
index b6dc7d26..49df715a 100644
--- a/src/ninep/cols.zig
+++ b/src/ninep/cols.zig
@@ -257,10 +257,12 @@ test "a column's ctl and exec act on it as its tag would, and rmdir closes it on
try testing.expectEqual(tree.Status.ok, th.wr(p, Node.ofCol(empty, .ctl), "New\n").reply.status);
try testing.expectEqual(@as(usize, 1), p.col_n[1]);
try testing.expectEqual(E.INVAL, th.wr(p, Node.ofCol(empty, .ctl), "Exit\n").errno());
+ var rec: [64]u8 = undefined;
+ try testing.expect(th.logHas(p, try std.fmt.bufPrint(&rec, "err - col/{d}/ctl: a column's ctl takes", .{empty})));
// rmdir refuses a column with a pane, and says why.
const full = th.call(p, .{ .tag = 1, .op = .release, .node = Node.ofCol(empty, .dir), .remove = true });
try testing.expectEqual(E.NOTEMPTY, full.errno());
- try testing.expect(th.logHas(p, "column not empty"));
+ try testing.expect(th.logHas(p, try std.fmt.bufPrint(&rec, "err - col/{d}: column not empty", .{empty})));
// exec runs a word as a click in that column's tag: Delcol closes it.
try testing.expectEqual(tree.Status.ok, th.wr(p, Node.ofCol(empty, .exec), "Delcol\n").reply.status);
try testing.expectEqual(@as(?usize, null), layout.columnBySerial(p, empty));