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