summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-03-29 15:38:23 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-03-29 15:38:23 +0000
commit0059ddf435005c04e2caeb3dd0313d317a56e000 (patch)
treeafbc5728e6d5e01fd410561cf9043c4636f4fdf2 /src
parent871e57018fab802ddaf3bc208eb5a968cc29df38 (diff)
parentc690968969e8e32c7baa704bce63ca32324cc1df (diff)
downloadnix-0059ddf435005c04e2caeb3dd0313d317a56e000.zip
Merge #1036
1036: Add several errno values for OpenBSD r=asomers a=sourgrasses It looks like OpenBSD added several new errno values in 6.2, and they've already been added to `libc`, so this should allow any crates using those to build on OpenBSD. Co-authored-by: Jenn Wheeler <jwheeler@antiochcollege.edu>
Diffstat (limited to 'src')
-rw-r--r--src/errno.rs97
1 files changed, 74 insertions, 23 deletions
diff --git a/src/errno.rs b/src/errno.rs
index 81a91c8c..6a2447bc 100644
--- a/src/errno.rs
+++ b/src/errno.rs
@@ -360,7 +360,8 @@ fn desc(errno: Errno) -> &'static str {
#[cfg(any(target_os = "linux", target_os = "android"))]
EDQUOT => "Quota exceeded",
- #[cfg(any(target_os = "linux", target_os = "android", target_os = "openbsd", target_os = "dragonfly"))]
+ #[cfg(any(target_os = "linux", target_os = "android",
+ target_os = "openbsd", target_os = "dragonfly"))]
ENOMEDIUM => "No medium found",
#[cfg(any(target_os = "linux", target_os = "android", target_os = "openbsd"))]
@@ -408,70 +409,112 @@ fn desc(errno: Errno) -> &'static str {
#[cfg(target_os = "freebsd")]
ECAPMODE => "Not permitted in capability mode",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "dragonfly", target_os = "ios",
+ target_os = "openbsd", target_os = "netbsd"))]
ENEEDAUTH => "Need authenticator",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "dragonfly", target_os = "ios",
+ target_os = "openbsd", target_os = "netbsd"))]
EOVERFLOW => "Value too large to be stored in data type",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "netbsd"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "dragonfly", target_os = "ios",
+ target_os = "netbsd"))]
EILSEQ => "Illegal byte sequence",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "dragonfly", target_os = "ios",
+ target_os = "openbsd", target_os = "netbsd"))]
ENOATTR => "Attribute not found",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "netbsd"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "dragonfly", target_os = "ios",
+ target_os = "openbsd", target_os = "netbsd"))]
EBADMSG => "Bad message",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "netbsd"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "dragonfly", target_os = "ios",
+ target_os = "openbsd", target_os = "netbsd"))]
EPROTO => "Protocol error",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "ios"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "ios", target_os = "openbsd", ))]
ENOTRECOVERABLE => "State not recoverable",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "ios"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "ios", target_os = "openbsd"))]
EOWNERDEAD => "Previous owner died",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "dragonfly", target_os = "ios",
+ target_os = "openbsd", target_os = "netbsd"))]
ENOTSUP => "Operation not supported",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "dragonfly", target_os = "ios",
+ target_os = "openbsd", target_os = "netbsd"))]
EPROCLIM => "Too many processes",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "dragonfly", target_os = "ios",
+ target_os = "openbsd", target_os = "netbsd"))]
EUSERS => "Too many users",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "dragonfly", target_os = "ios",
+ target_os = "openbsd", target_os = "netbsd"))]
EDQUOT => "Disc quota exceeded",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "dragonfly", target_os = "ios",
+ target_os = "openbsd", target_os = "netbsd"))]
ESTALE => "Stale NFS file handle",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "dragonfly", target_os = "ios",
+ target_os = "openbsd", target_os = "netbsd"))]
EREMOTE => "Too many levels of remote in path",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "dragonfly", target_os = "ios",
+ target_os = "openbsd", target_os = "netbsd"))]
EBADRPC => "RPC struct is bad",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "dragonfly", target_os = "ios",
+ target_os = "openbsd", target_os = "netbsd"))]
ERPCMISMATCH => "RPC version wrong",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "dragonfly", target_os = "ios",
+ target_os = "openbsd", target_os = "netbsd"))]
EPROGUNAVAIL => "RPC prog. not avail",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "dragonfly", target_os = "ios",
+ target_os = "openbsd", target_os = "netbsd"))]
EPROGMISMATCH => "Program version wrong",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "dragonfly", target_os = "ios",
+ target_os = "openbsd", target_os = "netbsd"))]
EPROCUNAVAIL => "Bad procedure for program",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "dragonfly", target_os = "ios",
+ target_os = "openbsd", target_os = "netbsd"))]
EFTYPE => "Inappropriate file type or format",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "dragonfly", target_os = "ios",
+ target_os = "openbsd", target_os = "netbsd"))]
EAUTH => "Authentication error",
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd",
+ target_os = "dragonfly", target_os = "ios",
+ target_os = "openbsd", target_os = "netbsd"))]
ECANCELED => "Operation canceled",
#[cfg(any(target_os = "macos", target_os = "ios"))]
@@ -1588,6 +1631,10 @@ mod consts {
EIDRM = libc::EIDRM,
ENOMSG = libc::ENOMSG,
ENOTSUP = libc::ENOTSUP,
+ EBADMSG = libc::EBADMSG,
+ ENOTRECOVERABLE = libc::ENOTRECOVERABLE,
+ EOWNERDEAD = libc::EOWNERDEAD,
+ EPROTO = libc::EPROTO,
}
pub const ELAST: Errno = Errno::ENOTSUP;
@@ -1690,6 +1737,10 @@ mod consts {
libc::EIDRM => EIDRM,
libc::ENOMSG => ENOMSG,
libc::ENOTSUP => ENOTSUP,
+ libc::EBADMSG => EBADMSG,
+ libc::ENOTRECOVERABLE => ENOTRECOVERABLE,
+ libc::EOWNERDEAD => EOWNERDEAD,
+ libc::EPROTO => EPROTO,
_ => UnknownErrno,
}
}