summaryrefslogtreecommitdiff
path: root/src/host_io.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 09:59:34 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commit6046b8c67bf6894824d2b7f72c476b9dfd5daa72 (patch)
tree835675bf66e05a11486d867e88527688de18ca14 /src/host_io.zig
parent8bc8bc2289e3e33903f9008b3513d0bd9c3f7311 (diff)
downloadpardes-6046b8c67bf6894824d2b7f72c476b9dfd5daa72.tar.gz
pardes-6046b8c67bf6894824d2b7f72c476b9dfd5daa72.zip
Errnos that fit: a Dump into a missing DumpDir and a shell that is not there are ENOENT, a GUI-only setting EINVAL
A Dump into a DumpDir not there failed EIO `file not found`; `no shell "x"` read as EIO through a mount; and a GUI-only setting on a terminal, EINVAL in the reply, had no word 9ns reads as EINVAL. Each says so in the words that give its errno: `no such directory`, `not found`, `invalid here`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/host_io.zig')
-rw-r--r--src/host_io.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/host_io.zig b/src/host_io.zig
index fbdfb703..913930ac 100644
--- a/src/host_io.zig
+++ b/src/host_io.zig
@@ -867,7 +867,8 @@ pub const Shell = struct {
buf[bin.len] = 0;
if (isDirectory(@ptrCast(&buf))) return std.fmt.bufPrint(said, "not a shell: {s} is a directory", .{bin}) catch "not a shell: a directory";
}
- return std.fmt.bufPrint(said, "no shell \"{s}\" (a name on the usual paths, or a path to one)", .{bin}) catch "no such shell";
+ // "not found": the words a mount reads as ENOENT.
+ return std.fmt.bufPrint(said, "no shell \"{s}\", not found (a name on the usual paths, or a path to one)", .{bin}) catch "no such shell";
}
fn fallback(buf: *[std.fs.max_path_bytes]u8) [*:0]const u8 {