authorgravatar for git@yorhel.nlYorhel <git@yorhel.nl> 2022-03-25 07:47:15+01:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-03-27 11:24:31+03:00
loga3030221c3bb3f3d59cedc6db83c679470fca417
tree5f0d40c83021d6e72e2971034984533b9c0a0a42
parent29c32b3dc50218d15f779201e154d425fffcefeb

std.fs: Handle EINVAL from linux.getdents64

Fixes #11178

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

lib/std/fs.zig+1-1
...@@ -605,7 +605,7 @@ pub const Dir = struct {...@@ -605,7 +605,7 @@ pub const Dir = struct {
605 .BADF => unreachable, // Dir is invalid or was opened without iteration ability605 .BADF => unreachable, // Dir is invalid or was opened without iteration ability
606 .FAULT => unreachable,606 .FAULT => unreachable,
607 .NOTDIR => unreachable,607 .NOTDIR => unreachable,
608 .INVAL => unreachable,608 .INVAL => return error.Unexpected, // Linux may in some cases return EINVAL when reading /proc/$PID/net.
609 else => |err| return os.unexpectedErrno(err),609 else => |err| return os.unexpectedErrno(err),
610 }610 }
611 if (rc == 0) return null;611 if (rc == 0) return null;