summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 19:58:56 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commit47f8181bea787c0211dff53b1a45ee7aa9bca0da (patch)
tree232a280f5dfac49652e04e476ae95d59add71201
parentd0efcd6d63d8e918d66a1c9493870e78586e9567 (diff)
downloadpardes-47f8181bea787c0211dff53b1a45ee7aa9bca0da.tar.gz
pardes-47f8181bea787c0211dff53b1a45ee7aa9bca0da.zip
A tag write past the limit says tag: no space: over 4096 bytes, which 9ns maps to ENOSPC as the docs say
The tree answers ENOSPC, but through a mount 9ns maps the words, and tag: over 4096 bytes carried none it knows, so a shell saw EIO. The words now hold no space; docs/fs.md says ENOSPC again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
-rw-r--r--docs/fs.md6
-rw-r--r--src/ninep/pane.zig6
2 files changed, 7 insertions, 5 deletions
diff --git a/docs/fs.md b/docs/fs.md
index 2e2f1453..06fa1406 100644
--- a/docs/fs.md
+++ b/docs/fs.md
@@ -134,8 +134,8 @@ never a C library string. Through 9ns the kernel sees an errno 9ns reads
from those words (cloud9 `9ns/src/nine.zig`, `enameToErrno`): `control
message`, `invalid` or `bad ` is EINVAL (malformed input); `no such`, `not
found` ENOENT; `in use` EBUSY; `no space` ENOSPC; `denied` EACCES; anything
-else, such as `no match for regexp`, `address out of range`, `Modified` or
-`tag: over 4096 bytes`, EIO. The `err` record has the words; a shell sees
+else, such as `no match for regexp`, `address out of range` or `Modified`,
+EIO. The `err` record has the words; a shell sees
only the errno, most often `Invalid argument` or `Input/output error`.
Not failures: a look that finds nothing (it answers nothing and logs one
@@ -320,7 +320,7 @@ blank matters; `echo` would start a second line). A pane tag may hold
several lines; a column or workspace tag is one, a newline written into it
becoming a space. Control characters other than tab, DEL, C1 controls and
non-UTF-8 bytes are refused (`invalid tag text`). The editable text is at
-most 4096 bytes (`tag: over 4096 bytes`, EIO). A clear is an ordinary edit
+most 4096 bytes (`tag: no space: over 4096 bytes`, ENOSPC). A clear is an ordinary edit
and `u` in the tag undoes it. [tags.md](tags.md) covers tags on screen.
## Panes
diff --git a/src/ninep/pane.zig b/src/ninep/pane.zig
index bb4ebf86..3c1e181e 100644
--- a/src/ninep/pane.zig
+++ b/src/ninep/pane.zig
@@ -571,7 +571,7 @@ fn writeTag(req: Req, pane: *Pane) Reply {
const had = tagline.curTail(pane).len;
const room = limits.max_tag_tail -| had -| @intFromBool(pf.tag_held_newline);
// Whole or not at all: a write that would pass the limit changes nothing.
- if (req.data.len > room) return tree.failText(req.tag, E.NOSPC, std.fmt.comptimePrint("tag: over {d} bytes", .{limits.max_tag_tail}));
+ if (req.data.len > room) return tree.failText(req.tag, E.NOSPC, std.fmt.comptimePrint("tag: no space: over {d} bytes", .{limits.max_tag_tail}));
const take = wholeUtf8(req.data);
// A truncating write drops ONE trailing newline, its whole text's: a
// newline held from a write before goes in once more text follows it.
@@ -1214,7 +1214,9 @@ test "a tag write past the limit is refused whole, naming the limit" {
const big = "w" ** (limits.max_tag_tail + 10);
const r = wr(p, tag, big);
try testing.expectEqual(E.NOSPC, r.errno());
- try testing.expect(std.mem.startsWith(u8, r.reply.ename, "tag: over "));
+ // `no space` is what 9ns maps to ENOSPC, so a shell through a mount
+ // sees the errno the tree gives.
+ try testing.expect(std.mem.startsWith(u8, r.reply.ename, "tag: no space: over "));
try testing.expectEqualStrings(before, rd(p, tag, 0, 1 << 16).bytes);
}