diff options
| -rw-r--r-- | build.zig.zon | 4 | ||||
| -rw-r--r-- | src/ninep/testing.zig | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/build.zig.zon b/build.zig.zon index a478df6e..5efe9c28 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -9,8 +9,8 @@ // read-only HTTPS URL is what a manifest can carry. Re-pin with // `zig fetch --save=cloud9 git+https://git.sr.ht/~gbrls/cloud9#<commit>`. .cloud9 = .{ - .url = "git+https://git.sr.ht/~gbrls/cloud9#12d78be492351e29144daa379232bbd955b47631", - .hash = "cloud9-0.1.0-yt86qjoTHgAqXvz1h23WqTagtZNodmM5lkWFZ7Ld_880", + .url = "git+https://git.sr.ht/~gbrls/cloud9#552584ad79448988646231c7993a36e55b0e8c05", + .hash = "cloud9-0.1.0-yt86qlkdHgCC4CRZQA1ttzUYpZ07PoIxzIysTOSSbmqW", }, // Pinned to the exact libvaxis commit ghostty is built against, so it // is compatible with ghostty's uucode configuration (the one we share diff --git a/src/ninep/testing.zig b/src/ninep/testing.zig index b8eaa02b..a35a9cf0 100644 --- a/src/ninep/testing.zig +++ b/src/ninep/testing.zig @@ -3,6 +3,7 @@ const std = @import("std"); const pardes = @import("../pardes.zig"); const tree = @import("tree.zig"); +const cloud9 = @import("cloud9"); const Pardes = pardes.Pardes; pub const Req = tree.Req; @@ -33,6 +34,13 @@ pub const Answer = struct { pub fn call(p: *Pardes, req: Req) Answer { var ans: Answer = .{}; ans.reply = p.serveFs(req); + // An EINVAL or ENOENT refusal says so in words a 9ns mount maps back + // to it (cloud9's enameErrno), or a shell through the mount hears EIO. + const said = ans.reply; + if (said.status == .err and said.ename.len > 0 and (said.errno == E.INVAL or said.errno == E.NOENT) and cloud9.fs.enameErrno(said.ename) != said.errno) { + std.debug.print("a mount reads this refusal as errno {d}, not {d}: \"{s}\"\n", .{ cloud9.fs.enameErrno(said.ename), said.errno, said.ename }); + @panic("a refusal's words do not say its errno"); + } ans.bytes = p.fsPayload(ans.reply); while (p.nextEffect()) |e| switch (e) { .save_file, .save_text => ans.saved = true, |
