Skip to content

Commit e4fdabb

Browse files
committed
Add missing mappings for ENOTSUP and EOPNOTSUPP error codes
1 parent ef80155 commit e4fdabb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/helpers.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ const UNIX_IO_ERROR_TABLE: &[(&str, std::io::ErrorKind)] = {
6060
("ENOENT", NotFound),
6161
("ENOMEM", OutOfMemory),
6262
("ENOSPC", StorageFull),
63-
("ENOSYS", Unsupported),
6463
("EMLINK", TooManyLinks),
6564
("ENAMETOOLONG", InvalidFilename),
6665
("ENETDOWN", NetworkDown),
@@ -75,12 +74,15 @@ const UNIX_IO_ERROR_TABLE: &[(&str, std::io::ErrorKind)] = {
7574
("ETIMEDOUT", TimedOut),
7675
("ETXTBSY", ExecutableFileBusy),
7776
("EXDEV", CrossesDevices),
78-
// The following have two valid options. We have both for the forwards mapping; only the
79-
// first one will be used for the backwards mapping.
77+
// The following have multiple valid options. We have all of them for the forwards mapping;
78+
// only the first one will be used for the backwards mapping.
8079
("EPERM", PermissionDenied),
8180
("EACCES", PermissionDenied),
8281
("EWOULDBLOCK", WouldBlock),
8382
("EAGAIN", WouldBlock),
83+
("ENOTSUP", Unsupported),
84+
("EOPNOTSUPP", Unsupported),
85+
("ENOSYS", Unsupported),
8486
]
8587
};
8688
// This mapping should match `decode_error_kind` in

0 commit comments

Comments
 (0)