Skip to content

Commit

Permalink
std.posix: handle INVAL in openatWasi
Browse files Browse the repository at this point in the history
In accordance with ziglang#19833 (comment)
  • Loading branch information
tealsnow authored and Igor Stojkovic committed Aug 11, 2024
1 parent e85ee3e commit 009a53b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/std/posix.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1676,10 +1676,8 @@ pub fn openatWasi(
.INTR => continue,

.FAULT => unreachable,
// FIXME: It is worth looking into returning a `error.BadPathName`
// here if wasi follows other posix behavior
// see: https://github.com/ziglang/zig/issues/15607
.INVAL => unreachable,
// Provides INVAL with a linux host on a bad path name, but NOENT on Windows
.INVAL => return error.BadPathName,
.BADF => unreachable,
.ACCES => return error.AccessDenied,
.FBIG => return error.FileTooBig,
Expand Down

0 comments on commit 009a53b

Please sign in to comment.