| 1 |
/* The first entry is a catch-all for codes not enumerated here. |
| 2 |
* This file is included multiple times to declare and define a structure |
| 3 |
* with these messages, and then to define a lookup table translating |
| 4 |
* error codes to offsets of corresponding fields in the structure. */ |
| 5 |
|
| 6 |
#ifdef __wasilibc_unmodified_upstream // Print "Success" for ESUCCESS. |
| 7 |
E(0, "No error information") |
| 8 |
#else |
| 9 |
E(0, "Success") |
| 10 |
#endif |
| 11 |
|
| 12 |
E(EILSEQ, "Illegal byte sequence") |
| 13 |
E(EDOM, "Domain error") |
| 14 |
E(ERANGE, "Result not representable") |
| 15 |
|
| 16 |
E(ENOTTY, "Not a tty") |
| 17 |
E(EACCES, "Permission denied") |
| 18 |
E(EPERM, "Operation not permitted") |
| 19 |
E(ENOENT, "No such file or directory") |
| 20 |
E(ESRCH, "No such process") |
| 21 |
E(EEXIST, "File exists") |
| 22 |
|
| 23 |
E(EOVERFLOW, "Value too large for data type") |
| 24 |
E(ENOSPC, "No space left on device") |
| 25 |
E(ENOMEM, "Out of memory") |
| 26 |
|
| 27 |
E(EBUSY, "Resource busy") |
| 28 |
E(EINTR, "Interrupted system call") |
| 29 |
E(EAGAIN, "Resource temporarily unavailable") |
| 30 |
E(ESPIPE, "Invalid seek") |
| 31 |
|
| 32 |
E(EXDEV, "Cross-device link") |
| 33 |
E(EROFS, "Read-only file system") |
| 34 |
E(ENOTEMPTY, "Directory not empty") |
| 35 |
|
| 36 |
E(ECONNRESET, "Connection reset by peer") |
| 37 |
E(ETIMEDOUT, "Operation timed out") |
| 38 |
E(ECONNREFUSED, "Connection refused") |
| 39 |
#ifdef __wasilibc_unmodified_upstream // errno value not in WASI |
| 40 |
E(EHOSTDOWN, "Host is down") |
| 41 |
#endif |
| 42 |
E(EHOSTUNREACH, "Host is unreachable") |
| 43 |
E(EADDRINUSE, "Address in use") |
| 44 |
|
| 45 |
E(EPIPE, "Broken pipe") |
| 46 |
E(EIO, "I/O error") |
| 47 |
E(ENXIO, "No such device or address") |
| 48 |
#ifdef __wasilibc_unmodified_upstream // errno value not in WASI |
| 49 |
E(ENOTBLK, "Block device required") |
| 50 |
#endif |
| 51 |
E(ENODEV, "No such device") |
| 52 |
E(ENOTDIR, "Not a directory") |
| 53 |
E(EISDIR, "Is a directory") |
| 54 |
E(ETXTBSY, "Text file busy") |
| 55 |
E(ENOEXEC, "Exec format error") |
| 56 |
|
| 57 |
E(EINVAL, "Invalid argument") |
| 58 |
|
| 59 |
E(E2BIG, "Argument list too long") |
| 60 |
E(ELOOP, "Symbolic link loop") |
| 61 |
E(ENAMETOOLONG, "Filename too long") |
| 62 |
E(ENFILE, "Too many open files in system") |
| 63 |
E(EMFILE, "No file descriptors available") |
| 64 |
E(EBADF, "Bad file descriptor") |
| 65 |
E(ECHILD, "No child process") |
| 66 |
E(EFAULT, "Bad address") |
| 67 |
E(EFBIG, "File too large") |
| 68 |
E(EMLINK, "Too many links") |
| 69 |
E(ENOLCK, "No locks available") |
| 70 |
|
| 71 |
E(EDEADLK, "Resource deadlock would occur") |
| 72 |
E(ENOTRECOVERABLE, "State not recoverable") |
| 73 |
E(EOWNERDEAD, "Previous owner died") |
| 74 |
E(ECANCELED, "Operation canceled") |
| 75 |
E(ENOSYS, "Function not implemented") |
| 76 |
E(ENOMSG, "No message of desired type") |
| 77 |
E(EIDRM, "Identifier removed") |
| 78 |
#ifdef __wasilibc_unmodified_upstream // errno value not in WASI |
| 79 |
E(ENOSTR, "Device not a stream") |
| 80 |
E(ENODATA, "No data available") |
| 81 |
E(ETIME, "Device timeout") |
| 82 |
E(ENOSR, "Out of streams resources") |
| 83 |
#endif |
| 84 |
E(ENOLINK, "Link has been severed") |
| 85 |
E(EPROTO, "Protocol error") |
| 86 |
E(EBADMSG, "Bad message") |
| 87 |
#ifdef __wasilibc_unmodified_upstream // errno value not in WASI |
| 88 |
E(EBADFD, "File descriptor in bad state") |
| 89 |
#endif |
| 90 |
E(ENOTSOCK, "Not a socket") |
| 91 |
E(EDESTADDRREQ, "Destination address required") |
| 92 |
E(EMSGSIZE, "Message too large") |
| 93 |
E(EPROTOTYPE, "Protocol wrong type for socket") |
| 94 |
E(ENOPROTOOPT, "Protocol not available") |
| 95 |
E(EPROTONOSUPPORT,"Protocol not supported") |
| 96 |
#ifdef __wasilibc_unmodified_upstream // errno value not in WASI |
| 97 |
E(ESOCKTNOSUPPORT,"Socket type not supported") |
| 98 |
#endif |
| 99 |
E(ENOTSUP, "Not supported") |
| 100 |
#ifdef __wasilibc_unmodified_upstream // errno value not in WASI |
| 101 |
E(EPFNOSUPPORT, "Protocol family not supported") |
| 102 |
#endif |
| 103 |
E(EAFNOSUPPORT, "Address family not supported by protocol") |
| 104 |
E(EADDRNOTAVAIL,"Address not available") |
| 105 |
E(ENETDOWN, "Network is down") |
| 106 |
E(ENETUNREACH, "Network unreachable") |
| 107 |
E(ENETRESET, "Connection reset by network") |
| 108 |
E(ECONNABORTED, "Connection aborted") |
| 109 |
E(ENOBUFS, "No buffer space available") |
| 110 |
E(EISCONN, "Socket is connected") |
| 111 |
E(ENOTCONN, "Socket not connected") |
| 112 |
#ifdef __wasilibc_unmodified_upstream // errno value not in WASI |
| 113 |
E(ESHUTDOWN, "Cannot send after socket shutdown") |
| 114 |
#endif |
| 115 |
E(EALREADY, "Operation already in progress") |
| 116 |
E(EINPROGRESS, "Operation in progress") |
| 117 |
E(ESTALE, "Stale file handle") |
| 118 |
#ifdef __wasilibc_unmodified_upstream // errno value not in WASI |
| 119 |
E(EREMOTEIO, "Remote I/O error") |
| 120 |
#endif |
| 121 |
E(EDQUOT, "Quota exceeded") |
| 122 |
#ifdef __wasilibc_unmodified_upstream // errno value not in WASI |
| 123 |
E(ENOMEDIUM, "No medium found") |
| 124 |
E(EMEDIUMTYPE, "Wrong medium type") |
| 125 |
#endif |
| 126 |
E(EMULTIHOP, "Multihop attempted") |
| 127 |
#ifdef __wasilibc_unmodified_upstream // errno value not in WASI |
| 128 |
E(ENOKEY, "Required key not available") |
| 129 |
E(EKEYEXPIRED, "Key has expired") |
| 130 |
E(EKEYREVOKED, "Key has been revoked") |
| 131 |
E(EKEYREJECTED, "Key was rejected by service") |
| 132 |
#endif |
| 133 |
#ifdef __wasilibc_unmodified_upstream // errno value in WASI and not musl |
| 134 |
#else |
| 135 |
// WASI adds this errno code. |
| 136 |
E(ENOTCAPABLE, "Capabilities insufficient") |
| 137 |
#endif |