authorgravatar for ketan.cs.reynolds@gmail.comKetan Reynolds <ketan.cs.reynolds@gmail.com> 2024-05-02 10:02:04+02:00
committergravatar for squeek502@hotmail.comRyan Liptak <squeek502@hotmail.com> 2024-07-28 19:01:55-07:00
log0403c4b05c811576ee205438e3782986d64f8056
tree9807951eac750cde314cae1a1c9cdc9d867b4e15
parentb4e7b6fdba2e4e212f8fa1e258ab6e869691baf0

std.posix: handle INVAL in openatWasi

In accordance with https://github.com/ziglang/zig/pull/19833#issuecomment-2089262607

1 files changed, 2 insertions(+), 4 deletions(-)

lib/std/posix.zig+2-4
...@@ -1676,10 +1676,8 @@ pub fn openatWasi(...@@ -1676,10 +1676,8 @@ pub fn openatWasi(
1676 .INTR => continue,1676 .INTR => continue,
16771677
1678 .FAULT => unreachable,1678 .FAULT => unreachable,
1679 // FIXME: It is worth looking into returning a `error.BadPathName`1679 // Provides INVAL with a linux host on a bad path name, but NOENT on Windows
1680 // here if wasi follows other posix behavior1680 .INVAL => return error.BadPathName,
1681 // see: https://github.com/ziglang/zig/issues/15607
1682 .INVAL => unreachable,
1683 .BADF => unreachable,1681 .BADF => unreachable,
1684 .ACCES => return error.AccessDenied,1682 .ACCES => return error.AccessDenied,
1685 .FBIG => return error.FileTooBig,1683 .FBIG => return error.FileTooBig,