linux_errno/
linux-errno_alpha.rs

1// Copyright (c) 2022 John Millikin <john@john-millikin.com>
2//
3// Permission to use, copy, modify, and/or distribute this software for any
4// purpose with or without fee is hereby granted.
5//
6// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
7// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
8// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
9// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
10// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
11// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
12// PERFORMANCE OF THIS SOFTWARE.
13//
14// SPDX-License-Identifier: 0BSD
15
16#![allow(unused)]
17
18errno_constants! {
19	// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/errno-base.h?h=v5.19
20	//
21	// Except for EAGAIN, which is redefined for Alpha.
22
23	/// Operation not permitted
24	EPERM = 1,
25	/// No such file or directory
26	ENOENT = 2,
27	/// No such process
28	ESRCH = 3,
29	/// Interrupted system call
30	EINTR = 4,
31	/// I/O error
32	EIO = 5,
33	/// No such device or address
34	ENXIO = 6,
35	/// Argument list too long
36	E2BIG = 7,
37	/// Exec format error
38	ENOEXEC = 8,
39	/// Bad file number
40	EBADF = 9,
41
42	/// No child processes
43	ECHILD = 10,
44	/// Out of memory
45	ENOMEM = 12,
46	/// Permission denied
47	EACCES = 13,
48	/// Bad address
49	EFAULT = 14,
50	/// Block device required
51	ENOTBLK = 15,
52	/// Device or resource busy
53	EBUSY = 16,
54	/// File exists
55	EEXIST = 17,
56	/// Cross-device link
57	EXDEV = 18,
58	/// No such device
59	ENODEV = 19,
60
61	/// Not a directory
62	ENOTDIR = 20,
63	/// Is a directory
64	EISDIR = 21,
65	/// Invalid argument
66	EINVAL = 22,
67	/// File table overflow
68	ENFILE = 23,
69	/// Too many open files
70	EMFILE = 24,
71	/// Not a typewriter
72	ENOTTY = 25,
73	/// Text file busy
74	ETXTBSY = 26,
75	/// File too large
76	EFBIG = 27,
77	/// No space left on device
78	ENOSPC = 28,
79	/// Illegal seek
80	ESPIPE = 29,
81
82	/// Read-only file system
83	EROFS = 30,
84	/// Too many links
85	EMLINK = 31,
86	/// Broken pipe
87	EPIPE = 32,
88	/// Math argument out of domain of func
89	EDOM = 33,
90	/// Math result not representable
91	ERANGE = 34,
92
93	// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/alpha/include/uapi/asm/errno.h?h=v5.19
94
95	/// Resource deadlock would occur
96	EDEADLK = 11,
97
98	/// Try again
99	EAGAIN = 35,
100	/// Operation now in progress
101	EINPROGRESS = 36,
102	/// Operation already in progress
103	EALREADY = 37,
104	/// Socket operation on non-socket
105	ENOTSOCK = 38,
106	/// Destination address required
107	EDESTADDRREQ = 39,
108
109	/// Message too long
110	EMSGSIZE = 40,
111	/// Protocol wrong type for socket
112	EPROTOTYPE = 41,
113	/// Protocol not available
114	ENOPROTOOPT = 42,
115	/// Protocol not supported
116	EPROTONOSUPPORT = 43,
117	/// Socket type not supported
118	ESOCKTNOSUPPORT = 44,
119	/// Operation not supported on transport endpoint
120	EOPNOTSUPP = 45,
121	/// Protocol family not supported
122	EPFNOSUPPORT = 46,
123	/// Address family not supported by protocol
124	EAFNOSUPPORT = 47,
125	/// Address already in use
126	EADDRINUSE = 48,
127	/// Cannot assign requested address
128	EADDRNOTAVAIL = 49,
129
130	/// Network is down
131	ENETDOWN = 50,
132	/// Network is unreachable
133	ENETUNREACH = 51,
134	/// Network dropped connection because of reset
135	ENETRESET = 52,
136	/// Software caused connection abort
137	ECONNABORTED = 53,
138	/// Connection reset by peer
139	ECONNRESET = 54,
140	/// No buffer space available
141	ENOBUFS = 55,
142	/// Transport endpoint is already connected
143	EISCONN = 56,
144	/// Transport endpoint is not connected
145	ENOTCONN = 57,
146	/// Cannot send after transport endpoint shutdown
147	ESHUTDOWN = 58,
148	/// Too many references: cannot splice
149	ETOOMANYREFS = 59,
150
151	/// Connection timed out
152	ETIMEDOUT = 60,
153	/// Connection refused
154	ECONNREFUSED = 61,
155	/// Too many symbolic links encountered
156	ELOOP = 62,
157	/// File name too long
158	ENAMETOOLONG = 63,
159	/// Host is down
160	EHOSTDOWN = 64,
161	/// No route to host
162	EHOSTUNREACH = 65,
163	/// Directory not empty
164	ENOTEMPTY = 66,
165	/// Too many users
166	EUSERS = 68,
167	/// Quota exceeded
168	EDQUOT = 69,
169
170	/// Stale file handle
171	ESTALE = 70,
172	/// Object is remote
173	EREMOTE = 71,
174	/// No record locks available
175	ENOLCK = 77,
176	/// Function not implemented
177	ENOSYS = 78,
178
179	/// No message of desired type
180	ENOMSG = 80,
181	/// Identifier removed
182	EIDRM = 81,
183	/// Out of streams resources
184	ENOSR = 82,
185	/// Timer expired
186	ETIME = 83,
187	/// Not a data message
188	EBADMSG = 84,
189	/// Protocol error
190	EPROTO = 85,
191	/// No data available
192	ENODATA = 86,
193	/// Device not a stream
194	ENOSTR = 87,
195	/// Channel number out of range
196	ECHRNG = 88,
197	/// Level 2 not synchronized
198	EL2NSYNC = 89,
199
200	/// Level 3 halted
201	EL3HLT = 90,
202	/// Level 3 reset
203	EL3RST = 91,
204	/// Package not installed
205	ENOPKG = 92,
206	/// Link number out of range
207	ELNRNG = 93,
208	/// Protocol driver not attached
209	EUNATCH = 94,
210	/// No CSI structure available
211	ENOCSI = 95,
212	/// Level 2 halted
213	EL2HLT = 96,
214	/// Invalid exchange
215	EBADE = 97,
216	/// Invalid request descriptor
217	EBADR = 98,
218	/// Exchange full
219	EXFULL = 99,
220
221	/// No anode
222	ENOANO = 100,
223	/// Invalid request code
224	EBADRQC = 101,
225	/// Invalid slot
226	EBADSLT = 102,
227	/// Bad font file format
228	EBFONT = 104,
229	/// Machine is not on the network
230	ENONET = 105,
231	/// Link has been severed
232	ENOLINK = 106,
233	/// Advertise error
234	EADV = 107,
235	/// Srmount error
236	ESRMNT = 108,
237	/// Communication error on send
238	ECOMM = 109,
239
240	/// Multihop attempted
241	EMULTIHOP = 110,
242	/// RFS specific error
243	EDOTDOT = 111,
244	/// Value too large for defined data type
245	EOVERFLOW = 112,
246	/// Name not unique on network
247	ENOTUNIQ = 113,
248	/// File descriptor in bad state
249	EBADFD = 114,
250	/// Remote address changed
251	EREMCHG = 115,
252	/// Illegal byte sequence
253	EILSEQ = 116,
254	/// Structure needs cleaning
255	EUCLEAN = 117,
256	/// Not a XENIX named type file
257	ENOTNAM = 118,
258	/// No XENIX semaphores available
259	ENAVAIL = 119,
260
261	/// Is a named type file
262	EISNAM = 120,
263	/// Remote I/O error
264	EREMOTEIO = 121,
265	/// Can not access a needed shared library
266	ELIBACC = 122,
267	/// Accessing a corrupted shared library
268	ELIBBAD = 123,
269	/// .lib section in a.out corrupted
270	ELIBSCN = 124,
271	/// Attempting to link in too many shared libraries
272	ELIBMAX = 125,
273	/// Cannot exec a shared library directly
274	ELIBEXEC = 126,
275	/// Interrupted system call should be restarted
276	ERESTART = 127,
277	/// Streams pipe error
278	ESTRPIPE = 128,
279	/// No medium found
280	ENOMEDIUM = 129,
281
282	/// Wrong medium type
283	EMEDIUMTYPE = 130,
284	/// Operation Cancelled
285	ECANCELED = 131,
286	/// Required key not available
287	ENOKEY = 132,
288	/// Key has expired
289	EKEYEXPIRED = 133,
290	/// Key has been revoked
291	EKEYREVOKED = 134,
292	/// Key was rejected by service
293	EKEYREJECTED = 135,
294	/// Owner died
295	EOWNERDEAD = 136,
296	/// State not recoverable
297	ENOTRECOVERABLE = 137,
298	/// Operation not possible due to RF-kill
299	ERFKILL = 138,
300	/// Memory page has hardware error
301	EHWPOISON = 139,
302}
303
304/// Alias for [EDEADLK]
305pub const EDEADLOCK: crate::Error = EDEADLK;
306
307/// Operation would block (alias for [EAGAIN])
308pub const EWOULDBLOCK: crate::Error = EAGAIN;