linux_errno/
linux-errno_parisc.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	/// Operation not permitted
22	EPERM = 1,
23	/// No such file or directory
24	ENOENT = 2,
25	/// No such process
26	ESRCH = 3,
27	/// Interrupted system call
28	EINTR = 4,
29	/// I/O error
30	EIO = 5,
31	/// No such device or address
32	ENXIO = 6,
33	/// Argument list too long
34	E2BIG = 7,
35	/// Exec format error
36	ENOEXEC = 8,
37	/// Bad file number
38	EBADF = 9,
39
40	/// No child processes
41	ECHILD = 10,
42	/// Try again
43	EAGAIN = 11,
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/parisc/include/uapi/asm/errno.h?h=v5.19
94
95	/// No message of desired type
96	ENOMSG = 35,
97	/// Identifier removed
98	EIDRM = 36,
99	/// Channel number out of range
100	ECHRNG = 37,
101	/// Level 2 not synchronized
102	EL2NSYNC = 38,
103	/// Level 3 halted
104	EL3HLT = 39,
105	/// Level 3 reset
106	EL3RST = 40,
107	/// Link number out of range
108	ELNRNG = 41,
109	/// Protocol driver not attached
110	EUNATCH = 42,
111	/// No CSI structure available
112	ENOCSI = 43,
113	/// Level 2 halted
114	EL2HLT = 44,
115	/// Resource deadlock would occur
116	EDEADLK = 45,
117	/// No record locks available
118	ENOLCK = 46,
119	/// Illegal byte sequence
120	EILSEQ = 47,
121	/// Machine is not on the network
122	ENONET = 50,
123	/// No data available
124	ENODATA = 51,
125	/// Timer expired
126	ETIME = 52,
127	/// Out of streams resources
128	ENOSR = 53,
129	/// Device not a stream
130	ENOSTR = 54,
131	/// Package not installed
132	ENOPKG = 55,
133	/// Link has been severed
134	ENOLINK = 57,
135	/// Advertise error
136	EADV = 58,
137	/// Srmount error
138	ESRMNT = 59,
139	/// Communication error on send
140	ECOMM = 60,
141	/// Protocol error
142	EPROTO = 61,
143	/// Multihop attempted
144	EMULTIHOP = 64,
145	/// RFS specific error
146	EDOTDOT = 66,
147	/// Not a data message
148	EBADMSG = 67,
149	/// Too many users
150	EUSERS = 68,
151	/// Quota exceeded
152	EDQUOT = 69,
153	/// Stale file handle
154	ESTALE = 70,
155	/// Object is remote
156	EREMOTE = 71,
157	/// Value too large for defined data type
158	EOVERFLOW = 72,
159	/// Invalid exchange
160	EBADE = 160,
161	/// Invalid request descriptor
162	EBADR = 161,
163	/// Exchange full
164	EXFULL = 162,
165	/// No anode
166	ENOANO = 163,
167	/// Invalid request code
168	EBADRQC = 164,
169	/// Invalid slot
170	EBADSLT = 165,
171	/// Bad font file format
172	EBFONT = 166,
173	/// Name not unique on network
174	ENOTUNIQ = 167,
175	/// File descriptor in bad state
176	EBADFD = 168,
177	/// Remote address changed
178	EREMCHG = 169,
179	/// Can not access a needed shared library
180	ELIBACC = 170,
181	/// Accessing a corrupted shared library
182	ELIBBAD = 171,
183	/// .lib section in a.out corrupted
184	ELIBSCN = 172,
185	/// Attempting to link in too many shared libraries
186	ELIBMAX = 173,
187	/// Cannot exec a shared library directly
188	ELIBEXEC = 174,
189	/// Interrupted system call should be restarted
190	ERESTART = 175,
191	/// Streams pipe error
192	ESTRPIPE = 176,
193	/// Structure needs cleaning
194	EUCLEAN = 177,
195	/// Not a XENIX named type file
196	ENOTNAM = 178,
197	/// No XENIX semaphores available
198	ENAVAIL = 179,
199	/// Is a named type file
200	EISNAM = 180,
201	/// Remote I/O error
202	EREMOTEIO = 181,
203	/// No medium found
204	ENOMEDIUM = 182,
205	/// Wrong medium type
206	EMEDIUMTYPE = 183,
207	/// Required key not available
208	ENOKEY = 184,
209	/// Key has expired
210	EKEYEXPIRED = 185,
211	/// Key has been revoked
212	EKEYREVOKED = 186,
213	/// Key was rejected by service
214	EKEYREJECTED = 187,
215	/// symbol does not exist in executable
216	ENOSYM = 215,
217	/// Socket operation on non-socket
218	ENOTSOCK = 216,
219	/// Destination address required
220	EDESTADDRREQ = 217,
221	/// Message too long
222	EMSGSIZE = 218,
223	/// Protocol wrong type for socket
224	EPROTOTYPE = 219,
225	/// Protocol not available
226	ENOPROTOOPT = 220,
227	/// Protocol not supported
228	EPROTONOSUPPORT = 221,
229	/// Socket type not supported
230	ESOCKTNOSUPPORT = 222,
231	/// Operation not supported on transport endpoint
232	EOPNOTSUPP = 223,
233	/// Protocol family not supported
234	EPFNOSUPPORT = 224,
235	/// Address family not supported by protocol
236	EAFNOSUPPORT = 225,
237	/// Address already in use
238	EADDRINUSE = 226,
239	/// Cannot assign requested address
240	EADDRNOTAVAIL = 227,
241	/// Network is down
242	ENETDOWN = 228,
243	/// Network is unreachable
244	ENETUNREACH = 229,
245	/// Network dropped connection because of reset
246	ENETRESET = 230,
247	/// Software caused connection abort
248	ECONNABORTED = 231,
249	/// Connection reset by peer
250	ECONNRESET = 232,
251	/// No buffer space available
252	ENOBUFS = 233,
253	/// Transport endpoint is already connected
254	EISCONN = 234,
255	/// Transport endpoint is not connected
256	ENOTCONN = 235,
257	/// Cannot send after transport endpoint shutdown
258	ESHUTDOWN = 236,
259	/// Too many references: cannot splice
260	ETOOMANYREFS = 237,
261	/// Connection timed out
262	ETIMEDOUT = 238,
263	/// Connection refused
264	ECONNREFUSED = 239,
265	/// Remote peer released connection
266	EREMOTERELEASE = 240,
267	/// Host is down
268	EHOSTDOWN = 241,
269	/// No route to host
270	EHOSTUNREACH = 242,
271	/// Operation already in progress
272	EALREADY = 244,
273	/// Operation now in progress
274	EINPROGRESS = 245,
275	/// Directory not empty
276	ENOTEMPTY = 247,
277	/// File name too long
278	ENAMETOOLONG = 248,
279	/// Too many symbolic links encountered
280	ELOOP = 249,
281	/// Function not implemented
282	ENOSYS = 251,
283	///  aio request was canceled before complete (POSIX.4 / HPUX)
284	ECANCELLED = 253,
285	/// Owner died
286	EOWNERDEAD = 254,
287	/// State not recoverable
288	ENOTRECOVERABLE = 255,
289	/// Operation not possible due to RF-kill
290	ERFKILL = 256,
291	/// Memory page has hardware error
292	EHWPOISON = 257,
293}
294
295/// SuSv3 and Solaris wants one 'L' (alias for [ECANCELLED])
296pub const ECANCELED: crate::Error = ECANCELLED;
297
298/// Alias for [EDEADLK]
299pub const EDEADLOCK: crate::Error = EDEADLK;
300
301/// For HP's NFS apparently (alias for [ECONNREFUSED])
302pub const EREFUSED: crate::Error = ECONNREFUSED;
303
304/// Operation would block (Not HPUX compliant) (alias for [ECANCELLED])
305pub const EWOULDBLOCK: crate::Error = EAGAIN;