Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion library/std/src/sys/io/error/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,14 @@ pub fn decode_error_kind(errno: i32) -> io::ErrorKind {
libc::EXDEV => CrossesDevices,
libc::EINPROGRESS => InProgress,
libc::EMFILE | libc::ENFILE => TooManyOpenFiles,
libc::EOPNOTSUPP => Unsupported,

libc::EACCES | libc::EPERM => PermissionDenied,

// EOPNOTSUPP and ENOTSUP can have the same value on some systems,
// but different values on others (e.g. Apple), so we can't use a
// match clause
x if x == libc::EOPNOTSUPP || x == libc::ENOTSUP => Unsupported,

// These two constants can have the same value on some systems,
// but different values on others, so we can't use a match
// clause
Expand Down
Loading