#![cfg_attr(feature = "cargo-clippy", allow(unreadable_literal))]
use std;
use phf;
use ErrnoCode;
use ErrnoCodes;
pub fn info_by_num(errnum: std::os::raw::c_int) -> Option<&'static ErrnoCode> {
BY_NUM.get(&errnum).map(|infos| &infos[0])
}
pub fn info_by_id(err_id: &str) -> Option<&'static ErrnoCode> {
BY_ID.get(err_id)
}
pub fn strerror(errnum: std::os::raw::c_int) -> Option<&'static str> {
info_by_num(errnum).map(|info| info.msg)
}
pub const EPERM: std::os::raw::c_int = 1;
pub const EPERM_MSG: &str = "Operation not permitted";
pub const EPERM_ID: &str = "EPERM";
pub const ENOENT: std::os::raw::c_int = 2;
pub const ENOENT_MSG: &str = "No such file or directory";
pub const ENOENT_ID: &str = "ENOENT";
pub const ESRCH: std::os::raw::c_int = 3;
pub const ESRCH_MSG: &str = "No such process";
pub const ESRCH_ID: &str = "ESRCH";
pub const EINTR: std::os::raw::c_int = 4;
pub const EINTR_MSG: &str = "Interrupted system call";
pub const EINTR_ID: &str = "EINTR";
pub const EIO: std::os::raw::c_int = 5;
pub const EIO_MSG: &str = "I/O error";
pub const EIO_ID: &str = "EIO";
pub const ENXIO: std::os::raw::c_int = 6;
pub const ENXIO_MSG: &str = "No such device or address";
pub const ENXIO_ID: &str = "ENXIO";
pub const E2BIG: std::os::raw::c_int = 7;
pub const E2BIG_MSG: &str = "Argument list too long";
pub const E2BIG_ID: &str = "E2BIG";
pub const ENOEXEC: std::os::raw::c_int = 8;
pub const ENOEXEC_MSG: &str = "Exec format error";
pub const ENOEXEC_ID: &str = "ENOEXEC";
pub const EBADF: std::os::raw::c_int = 9;
pub const EBADF_MSG: &str = "Bad file number";
pub const EBADF_ID: &str = "EBADF";
pub const ECHILD: std::os::raw::c_int = 10;
pub const ECHILD_MSG: &str = "No child processes";
pub const ECHILD_ID: &str = "ECHILD";
pub const EAGAIN: std::os::raw::c_int = 11;
pub const EAGAIN_MSG: &str = "Try again";
pub const EAGAIN_ID: &str = "EAGAIN";
pub const ENOMEM: std::os::raw::c_int = 12;
pub const ENOMEM_MSG: &str = "Out of memory";
pub const ENOMEM_ID: &str = "ENOMEM";
pub const EACCES: std::os::raw::c_int = 13;
pub const EACCES_MSG: &str = "Permission denied";
pub const EACCES_ID: &str = "EACCES";
pub const EFAULT: std::os::raw::c_int = 14;
pub const EFAULT_MSG: &str = "Bad address";
pub const EFAULT_ID: &str = "EFAULT";
pub const ENOTBLK: std::os::raw::c_int = 15;
pub const ENOTBLK_MSG: &str = "Block device required";
pub const ENOTBLK_ID: &str = "ENOTBLK";
pub const EBUSY: std::os::raw::c_int = 16;
pub const EBUSY_MSG: &str = "Device or resource busy";
pub const EBUSY_ID: &str = "EBUSY";
pub const EEXIST: std::os::raw::c_int = 17;
pub const EEXIST_MSG: &str = "File exists";
pub const EEXIST_ID: &str = "EEXIST";
pub const EXDEV: std::os::raw::c_int = 18;
pub const EXDEV_MSG: &str = "Cross-device link";
pub const EXDEV_ID: &str = "EXDEV";
pub const ENODEV: std::os::raw::c_int = 19;
pub const ENODEV_MSG: &str = "No such device";
pub const ENODEV_ID: &str = "ENODEV";
pub const ENOTDIR: std::os::raw::c_int = 20;
pub const ENOTDIR_MSG: &str = "Not a directory";
pub const ENOTDIR_ID: &str = "ENOTDIR";
pub const EISDIR: std::os::raw::c_int = 21;
pub const EISDIR_MSG: &str = "Is a directory";
pub const EISDIR_ID: &str = "EISDIR";
pub const EINVAL: std::os::raw::c_int = 22;
pub const EINVAL_MSG: &str = "Invalid argument";
pub const EINVAL_ID: &str = "EINVAL";
pub const ENFILE: std::os::raw::c_int = 23;
pub const ENFILE_MSG: &str = "File table overflow";
pub const ENFILE_ID: &str = "ENFILE";
pub const EMFILE: std::os::raw::c_int = 24;
pub const EMFILE_MSG: &str = "Too many open files";
pub const EMFILE_ID: &str = "EMFILE";
pub const ENOTTY: std::os::raw::c_int = 25;
pub const ENOTTY_MSG: &str = "Not a typewriter";
pub const ENOTTY_ID: &str = "ENOTTY";
pub const ETXTBSY: std::os::raw::c_int = 26;
pub const ETXTBSY_MSG: &str = "Text file busy";
pub const ETXTBSY_ID: &str = "ETXTBSY";
pub const EFBIG: std::os::raw::c_int = 27;
pub const EFBIG_MSG: &str = "File too large";
pub const EFBIG_ID: &str = "EFBIG";
pub const ENOSPC: std::os::raw::c_int = 28;
pub const ENOSPC_MSG: &str = "No space left on device";
pub const ENOSPC_ID: &str = "ENOSPC";
pub const ESPIPE: std::os::raw::c_int = 29;
pub const ESPIPE_MSG: &str = "Illegal seek";
pub const ESPIPE_ID: &str = "ESPIPE";
pub const EROFS: std::os::raw::c_int = 30;
pub const EROFS_MSG: &str = "Read-only file system";
pub const EROFS_ID: &str = "EROFS";
pub const EMLINK: std::os::raw::c_int = 31;
pub const EMLINK_MSG: &str = "Too many links";
pub const EMLINK_ID: &str = "EMLINK";
pub const EPIPE: std::os::raw::c_int = 32;
pub const EPIPE_MSG: &str = "Broken pipe";
pub const EPIPE_ID: &str = "EPIPE";
pub const EDOM: std::os::raw::c_int = 33;
pub const EDOM_MSG: &str = "Math argument out of domain of func";
pub const EDOM_ID: &str = "EDOM";
pub const ERANGE: std::os::raw::c_int = 34;
pub const ERANGE_MSG: &str = "Math result not representable";
pub const ERANGE_ID: &str = "ERANGE";
pub const EDEADLK: std::os::raw::c_int = 35;
pub const EDEADLK_MSG: &str = "Resource deadlock would occur";
pub const EDEADLK_ID: &str = "EDEADLK";
pub const ENAMETOOLONG: std::os::raw::c_int = 36;
pub const ENAMETOOLONG_MSG: &str = "File name too long";
pub const ENAMETOOLONG_ID: &str = "ENAMETOOLONG";
pub const ENOLCK: std::os::raw::c_int = 37;
pub const ENOLCK_MSG: &str = "No record locks available";
pub const ENOLCK_ID: &str = "ENOLCK";
pub const ENOSYS: std::os::raw::c_int = 38;
pub const ENOSYS_MSG: &str = "Invalid system call number";
pub const ENOSYS_ID: &str = "ENOSYS";
pub const ENOTEMPTY: std::os::raw::c_int = 39;
pub const ENOTEMPTY_MSG: &str = "Directory not empty";
pub const ENOTEMPTY_ID: &str = "ENOTEMPTY";
pub const ELOOP: std::os::raw::c_int = 40;
pub const ELOOP_MSG: &str = "Too many symbolic links encountered";
pub const ELOOP_ID: &str = "ELOOP";
pub const EWOULDBLOCK: std::os::raw::c_int = EAGAIN;
pub const EWOULDBLOCK_MSG: &str = "Operation would block";
pub const EWOULDBLOCK_ID: &str = "EWOULDBLOCK";
pub const ENOMSG: std::os::raw::c_int = 42;
pub const ENOMSG_MSG: &str = "No message of desired type";
pub const ENOMSG_ID: &str = "ENOMSG";
pub const EIDRM: std::os::raw::c_int = 43;
pub const EIDRM_MSG: &str = "Identifier removed";
pub const EIDRM_ID: &str = "EIDRM";
pub const ECHRNG: std::os::raw::c_int = 44;
pub const ECHRNG_MSG: &str = "Channel number out of range";
pub const ECHRNG_ID: &str = "ECHRNG";
pub const EL2NSYNC: std::os::raw::c_int = 45;
pub const EL2NSYNC_MSG: &str = "Level 2 not synchronized";
pub const EL2NSYNC_ID: &str = "EL2NSYNC";
pub const EL3HLT: std::os::raw::c_int = 46;
pub const EL3HLT_MSG: &str = "Level 3 halted";
pub const EL3HLT_ID: &str = "EL3HLT";
pub const EL3RST: std::os::raw::c_int = 47;
pub const EL3RST_MSG: &str = "Level 3 reset";
pub const EL3RST_ID: &str = "EL3RST";
pub const ELNRNG: std::os::raw::c_int = 48;
pub const ELNRNG_MSG: &str = "Link number out of range";
pub const ELNRNG_ID: &str = "ELNRNG";
pub const EUNATCH: std::os::raw::c_int = 49;
pub const EUNATCH_MSG: &str = "Protocol driver not attached";
pub const EUNATCH_ID: &str = "EUNATCH";
pub const ENOCSI: std::os::raw::c_int = 50;
pub const ENOCSI_MSG: &str = "No CSI structure available";
pub const ENOCSI_ID: &str = "ENOCSI";
pub const EL2HLT: std::os::raw::c_int = 51;
pub const EL2HLT_MSG: &str = "Level 2 halted";
pub const EL2HLT_ID: &str = "EL2HLT";
pub const EBADE: std::os::raw::c_int = 52;
pub const EBADE_MSG: &str = "Invalid exchange";
pub const EBADE_ID: &str = "EBADE";
pub const EBADR: std::os::raw::c_int = 53;
pub const EBADR_MSG: &str = "Invalid request descriptor";
pub const EBADR_ID: &str = "EBADR";
pub const EXFULL: std::os::raw::c_int = 54;
pub const EXFULL_MSG: &str = "Exchange full";
pub const EXFULL_ID: &str = "EXFULL";
pub const ENOANO: std::os::raw::c_int = 55;
pub const ENOANO_MSG: &str = "No anode";
pub const ENOANO_ID: &str = "ENOANO";
pub const EBADRQC: std::os::raw::c_int = 56;
pub const EBADRQC_MSG: &str = "Invalid request code";
pub const EBADRQC_ID: &str = "EBADRQC";
pub const EBADSLT: std::os::raw::c_int = 57;
pub const EBADSLT_MSG: &str = "Invalid slot";
pub const EBADSLT_ID: &str = "EBADSLT";
pub const EDEADLOCK: std::os::raw::c_int = EDEADLK;
pub const EDEADLOCK_MSG: &str = "Same as EDEADLK (Resource deadlock would occur)";
pub const EDEADLOCK_ID: &str = "EDEADLOCK";
pub const EBFONT: std::os::raw::c_int = 59;
pub const EBFONT_MSG: &str = "Bad font file format";
pub const EBFONT_ID: &str = "EBFONT";
pub const ENOSTR: std::os::raw::c_int = 60;
pub const ENOSTR_MSG: &str = "Device not a stream";
pub const ENOSTR_ID: &str = "ENOSTR";
pub const ENODATA: std::os::raw::c_int = 61;
pub const ENODATA_MSG: &str = "No data available";
pub const ENODATA_ID: &str = "ENODATA";
pub const ETIME: std::os::raw::c_int = 62;
pub const ETIME_MSG: &str = "Timer expired";
pub const ETIME_ID: &str = "ETIME";
pub const ENOSR: std::os::raw::c_int = 63;
pub const ENOSR_MSG: &str = "Out of streams resources";
pub const ENOSR_ID: &str = "ENOSR";
pub const ENONET: std::os::raw::c_int = 64;
pub const ENONET_MSG: &str = "Machine is not on the network";
pub const ENONET_ID: &str = "ENONET";
pub const ENOPKG: std::os::raw::c_int = 65;
pub const ENOPKG_MSG: &str = "Package not installed";
pub const ENOPKG_ID: &str = "ENOPKG";
pub const EREMOTE: std::os::raw::c_int = 66;
pub const EREMOTE_MSG: &str = "Object is remote";
pub const EREMOTE_ID: &str = "EREMOTE";
pub const ENOLINK: std::os::raw::c_int = 67;
pub const ENOLINK_MSG: &str = "Link has been severed";
pub const ENOLINK_ID: &str = "ENOLINK";
pub const EADV: std::os::raw::c_int = 68;
pub const EADV_MSG: &str = "Advertise error";
pub const EADV_ID: &str = "EADV";
pub const ESRMNT: std::os::raw::c_int = 69;
pub const ESRMNT_MSG: &str = "Srmount error";
pub const ESRMNT_ID: &str = "ESRMNT";
pub const ECOMM: std::os::raw::c_int = 70;
pub const ECOMM_MSG: &str = "Communication error on send";
pub const ECOMM_ID: &str = "ECOMM";
pub const EPROTO: std::os::raw::c_int = 71;
pub const EPROTO_MSG: &str = "Protocol error";
pub const EPROTO_ID: &str = "EPROTO";
pub const EMULTIHOP: std::os::raw::c_int = 72;
pub const EMULTIHOP_MSG: &str = "Multihop attempted";
pub const EMULTIHOP_ID: &str = "EMULTIHOP";
pub const EDOTDOT: std::os::raw::c_int = 73;
pub const EDOTDOT_MSG: &str = "RFS specific error";
pub const EDOTDOT_ID: &str = "EDOTDOT";
pub const EBADMSG: std::os::raw::c_int = 74;
pub const EBADMSG_MSG: &str = "Not a data message";
pub const EBADMSG_ID: &str = "EBADMSG";
pub const EOVERFLOW: std::os::raw::c_int = 75;
pub const EOVERFLOW_MSG: &str = "Value too large for defined data type";
pub const EOVERFLOW_ID: &str = "EOVERFLOW";
pub const ENOTUNIQ: std::os::raw::c_int = 76;
pub const ENOTUNIQ_MSG: &str = "Name not unique on network";
pub const ENOTUNIQ_ID: &str = "ENOTUNIQ";
pub const EBADFD: std::os::raw::c_int = 77;
pub const EBADFD_MSG: &str = "File descriptor in bad state";
pub const EBADFD_ID: &str = "EBADFD";
pub const EREMCHG: std::os::raw::c_int = 78;
pub const EREMCHG_MSG: &str = "Remote address changed";
pub const EREMCHG_ID: &str = "EREMCHG";
pub const ELIBACC: std::os::raw::c_int = 79;
pub const ELIBACC_MSG: &str = "Can not access a needed shared library";
pub const ELIBACC_ID: &str = "ELIBACC";
pub const ELIBBAD: std::os::raw::c_int = 80;
pub const ELIBBAD_MSG: &str = "Accessing a corrupted shared library";
pub const ELIBBAD_ID: &str = "ELIBBAD";
pub const ELIBSCN: std::os::raw::c_int = 81;
pub const ELIBSCN_MSG: &str = ".lib section in a.out corrupted";
pub const ELIBSCN_ID: &str = "ELIBSCN";
pub const ELIBMAX: std::os::raw::c_int = 82;
pub const ELIBMAX_MSG: &str = "Attempting to link in too many shared libraries";
pub const ELIBMAX_ID: &str = "ELIBMAX";
pub const ELIBEXEC: std::os::raw::c_int = 83;
pub const ELIBEXEC_MSG: &str = "Cannot exec a shared library directly";
pub const ELIBEXEC_ID: &str = "ELIBEXEC";
pub const EILSEQ: std::os::raw::c_int = 84;
pub const EILSEQ_MSG: &str = "Illegal byte sequence";
pub const EILSEQ_ID: &str = "EILSEQ";
pub const ERESTART: std::os::raw::c_int = 85;
pub const ERESTART_MSG: &str = "Interrupted system call should be restarted";
pub const ERESTART_ID: &str = "ERESTART";
pub const ESTRPIPE: std::os::raw::c_int = 86;
pub const ESTRPIPE_MSG: &str = "Streams pipe error";
pub const ESTRPIPE_ID: &str = "ESTRPIPE";
pub const EUSERS: std::os::raw::c_int = 87;
pub const EUSERS_MSG: &str = "Too many users";
pub const EUSERS_ID: &str = "EUSERS";
pub const ENOTSOCK: std::os::raw::c_int = 88;
pub const ENOTSOCK_MSG: &str = "Socket operation on non-socket";
pub const ENOTSOCK_ID: &str = "ENOTSOCK";
pub const EDESTADDRREQ: std::os::raw::c_int = 89;
pub const EDESTADDRREQ_MSG: &str = "Destination address required";
pub const EDESTADDRREQ_ID: &str = "EDESTADDRREQ";
pub const EMSGSIZE: std::os::raw::c_int = 90;
pub const EMSGSIZE_MSG: &str = "Message too long";
pub const EMSGSIZE_ID: &str = "EMSGSIZE";
pub const EPROTOTYPE: std::os::raw::c_int = 91;
pub const EPROTOTYPE_MSG: &str = "Protocol wrong type for socket";
pub const EPROTOTYPE_ID: &str = "EPROTOTYPE";
pub const ENOPROTOOPT: std::os::raw::c_int = 92;
pub const ENOPROTOOPT_MSG: &str = "Protocol not available";
pub const ENOPROTOOPT_ID: &str = "ENOPROTOOPT";
pub const EPROTONOSUPPORT: std::os::raw::c_int = 93;
pub const EPROTONOSUPPORT_MSG: &str = "Protocol not supported";
pub const EPROTONOSUPPORT_ID: &str = "EPROTONOSUPPORT";
pub const ESOCKTNOSUPPORT: std::os::raw::c_int = 94;
pub const ESOCKTNOSUPPORT_MSG: &str = "Socket type not supported";
pub const ESOCKTNOSUPPORT_ID: &str = "ESOCKTNOSUPPORT";
pub const EOPNOTSUPP: std::os::raw::c_int = 95;
pub const EOPNOTSUPP_MSG: &str = "Operation not supported on transport endpoint";
pub const EOPNOTSUPP_ID: &str = "EOPNOTSUPP";
pub const EPFNOSUPPORT: std::os::raw::c_int = 96;
pub const EPFNOSUPPORT_MSG: &str = "Protocol family not supported";
pub const EPFNOSUPPORT_ID: &str = "EPFNOSUPPORT";
pub const EAFNOSUPPORT: std::os::raw::c_int = 97;
pub const EAFNOSUPPORT_MSG: &str = "Address family not supported by protocol";
pub const EAFNOSUPPORT_ID: &str = "EAFNOSUPPORT";
pub const EADDRINUSE: std::os::raw::c_int = 98;
pub const EADDRINUSE_MSG: &str = "Address already in use";
pub const EADDRINUSE_ID: &str = "EADDRINUSE";
pub const EADDRNOTAVAIL: std::os::raw::c_int = 99;
pub const EADDRNOTAVAIL_MSG: &str = "Cannot assign requested address";
pub const EADDRNOTAVAIL_ID: &str = "EADDRNOTAVAIL";
pub const ENETDOWN: std::os::raw::c_int = 100;
pub const ENETDOWN_MSG: &str = "Network is down";
pub const ENETDOWN_ID: &str = "ENETDOWN";
pub const ENETUNREACH: std::os::raw::c_int = 101;
pub const ENETUNREACH_MSG: &str = "Network is unreachable";
pub const ENETUNREACH_ID: &str = "ENETUNREACH";
pub const ENETRESET: std::os::raw::c_int = 102;
pub const ENETRESET_MSG: &str = "Network dropped connection because of reset";
pub const ENETRESET_ID: &str = "ENETRESET";
pub const ECONNABORTED: std::os::raw::c_int = 103;
pub const ECONNABORTED_MSG: &str = "Software caused connection abort";
pub const ECONNABORTED_ID: &str = "ECONNABORTED";
pub const ECONNRESET: std::os::raw::c_int = 104;
pub const ECONNRESET_MSG: &str = "Connection reset by peer";
pub const ECONNRESET_ID: &str = "ECONNRESET";
pub const ENOBUFS: std::os::raw::c_int = 105;
pub const ENOBUFS_MSG: &str = "No buffer space available";
pub const ENOBUFS_ID: &str = "ENOBUFS";
pub const EISCONN: std::os::raw::c_int = 106;
pub const EISCONN_MSG: &str = "Transport endpoint is already connected";
pub const EISCONN_ID: &str = "EISCONN";
pub const ENOTCONN: std::os::raw::c_int = 107;
pub const ENOTCONN_MSG: &str = "Transport endpoint is not connected";
pub const ENOTCONN_ID: &str = "ENOTCONN";
pub const ESHUTDOWN: std::os::raw::c_int = 108;
pub const ESHUTDOWN_MSG: &str = "Cannot send after transport endpoint shutdown";
pub const ESHUTDOWN_ID: &str = "ESHUTDOWN";
pub const ETOOMANYREFS: std::os::raw::c_int = 109;
pub const ETOOMANYREFS_MSG: &str = "Too many references: cannot splice";
pub const ETOOMANYREFS_ID: &str = "ETOOMANYREFS";
pub const ETIMEDOUT: std::os::raw::c_int = 110;
pub const ETIMEDOUT_MSG: &str = "Connection timed out";
pub const ETIMEDOUT_ID: &str = "ETIMEDOUT";
pub const ECONNREFUSED: std::os::raw::c_int = 111;
pub const ECONNREFUSED_MSG: &str = "Connection refused";
pub const ECONNREFUSED_ID: &str = "ECONNREFUSED";
pub const EHOSTDOWN: std::os::raw::c_int = 112;
pub const EHOSTDOWN_MSG: &str = "Host is down";
pub const EHOSTDOWN_ID: &str = "EHOSTDOWN";
pub const EHOSTUNREACH: std::os::raw::c_int = 113;
pub const EHOSTUNREACH_MSG: &str = "No route to host";
pub const EHOSTUNREACH_ID: &str = "EHOSTUNREACH";
pub const EALREADY: std::os::raw::c_int = 114;
pub const EALREADY_MSG: &str = "Operation already in progress";
pub const EALREADY_ID: &str = "EALREADY";
pub const EINPROGRESS: std::os::raw::c_int = 115;
pub const EINPROGRESS_MSG: &str = "Operation now in progress";
pub const EINPROGRESS_ID: &str = "EINPROGRESS";
pub const ESTALE: std::os::raw::c_int = 116;
pub const ESTALE_MSG: &str = "Stale file handle";
pub const ESTALE_ID: &str = "ESTALE";
pub const EUCLEAN: std::os::raw::c_int = 117;
pub const EUCLEAN_MSG: &str = "Structure needs cleaning";
pub const EUCLEAN_ID: &str = "EUCLEAN";
pub const ENOTNAM: std::os::raw::c_int = 118;
pub const ENOTNAM_MSG: &str = "Not a XENIX named type file";
pub const ENOTNAM_ID: &str = "ENOTNAM";
pub const ENAVAIL: std::os::raw::c_int = 119;
pub const ENAVAIL_MSG: &str = "No XENIX semaphores available";
pub const ENAVAIL_ID: &str = "ENAVAIL";
pub const EISNAM: std::os::raw::c_int = 120;
pub const EISNAM_MSG: &str = "Is a named type file";
pub const EISNAM_ID: &str = "EISNAM";
pub const EREMOTEIO: std::os::raw::c_int = 121;
pub const EREMOTEIO_MSG: &str = "Remote I/O error";
pub const EREMOTEIO_ID: &str = "EREMOTEIO";
pub const EDQUOT: std::os::raw::c_int = 122;
pub const EDQUOT_MSG: &str = "Quota exceeded";
pub const EDQUOT_ID: &str = "EDQUOT";
pub const ENOMEDIUM: std::os::raw::c_int = 123;
pub const ENOMEDIUM_MSG: &str = "No medium found";
pub const ENOMEDIUM_ID: &str = "ENOMEDIUM";
pub const EMEDIUMTYPE: std::os::raw::c_int = 124;
pub const EMEDIUMTYPE_MSG: &str = "Wrong medium type";
pub const EMEDIUMTYPE_ID: &str = "EMEDIUMTYPE";
pub const ECANCELED: std::os::raw::c_int = 125;
pub const ECANCELED_MSG: &str = "Operation Canceled";
pub const ECANCELED_ID: &str = "ECANCELED";
pub const ENOKEY: std::os::raw::c_int = 126;
pub const ENOKEY_MSG: &str = "Required key not available";
pub const ENOKEY_ID: &str = "ENOKEY";
pub const EKEYEXPIRED: std::os::raw::c_int = 127;
pub const EKEYEXPIRED_MSG: &str = "Key has expired";
pub const EKEYEXPIRED_ID: &str = "EKEYEXPIRED";
pub const EKEYREVOKED: std::os::raw::c_int = 128;
pub const EKEYREVOKED_MSG: &str = "Key has been revoked";
pub const EKEYREVOKED_ID: &str = "EKEYREVOKED";
pub const EKEYREJECTED: std::os::raw::c_int = 129;
pub const EKEYREJECTED_MSG: &str = "Key was rejected by service";
pub const EKEYREJECTED_ID: &str = "EKEYREJECTED";
pub const EOWNERDEAD: std::os::raw::c_int = 130;
pub const EOWNERDEAD_MSG: &str = "Owner died";
pub const EOWNERDEAD_ID: &str = "EOWNERDEAD";
pub const ENOTRECOVERABLE: std::os::raw::c_int = 131;
pub const ENOTRECOVERABLE_MSG: &str = "State not recoverable";
pub const ENOTRECOVERABLE_ID: &str = "ENOTRECOVERABLE";
pub const ERFKILL: std::os::raw::c_int = 132;
pub const ERFKILL_MSG: &str = "Operation not possible due to RF-kill";
pub const ERFKILL_ID: &str = "ERFKILL";
pub const EHWPOISON: std::os::raw::c_int = 133;
pub const EHWPOISON_MSG: &str = "Memory page has hardware error";
pub const EHWPOISON_ID: &str = "EHWPOISON";
include!(concat!(env!("OUT_DIR"), "/unix.linux.s390.rs"));
#[cfg(test)]
mod tests {
use ErrnoCode;
#[test]
fn info_by_num() {
assert_eq!(
super::info_by_num(super::EDOM),
Some(&ErrnoCode {
num: super::EDOM,
msg: super::EDOM_MSG,
id: super::EDOM_ID,
})
);
}
#[test]
fn info_by_id() {
assert_eq!(
super::info_by_id(super::EDOM_ID),
Some(&ErrnoCode {
num: super::EDOM,
msg: super::EDOM_MSG,
id: super::EDOM_ID,
})
);
}
#[test]
fn strerror() {
assert_eq!(super::strerror(super::EDOM), Some(super::EDOM_MSG));
assert_eq!(super::strerror(0), None);
}
}