linux_errnos/linux/
alpha.rs

1//! Error numbers for arch `alpha`.
2
3#![allow(dead_code)]
4
5// This file automatically generate. Do not edit.
6
7crate::macros::def_errno!();
8
9impl Errno {
10    /// Operation not permitted
11    pub const EPERM: Self = Self(1);
12    /// No such file or directory
13    pub const ENOENT: Self = Self(2);
14    /// No such process
15    pub const ESRCH: Self = Self(3);
16    /// Interrupted system call
17    pub const EINTR: Self = Self(4);
18    /// I/O error
19    pub const EIO: Self = Self(5);
20    /// No such device or address
21    pub const ENXIO: Self = Self(6);
22    /// Argument list too long
23    pub const E2BIG: Self = Self(7);
24    /// Exec format error
25    pub const ENOEXEC: Self = Self(8);
26    /// Bad file number
27    pub const EBADF: Self = Self(9);
28    /// No child processes
29    pub const ECHILD: Self = Self(10);
30    /// Resource deadlock would occur
31    pub const EDEADLK: Self = Self(11);
32    /// Out of memory
33    pub const ENOMEM: Self = Self(12);
34    /// Permission denied
35    pub const EACCES: Self = Self(13);
36    /// Bad address
37    pub const EFAULT: Self = Self(14);
38    /// Block device required
39    pub const ENOTBLK: Self = Self(15);
40    /// Device or resource busy
41    pub const EBUSY: Self = Self(16);
42    /// File exists
43    pub const EEXIST: Self = Self(17);
44    /// Cross-device link
45    pub const EXDEV: Self = Self(18);
46    /// No such device
47    pub const ENODEV: Self = Self(19);
48    /// Not a directory
49    pub const ENOTDIR: Self = Self(20);
50    /// Is a directory
51    pub const EISDIR: Self = Self(21);
52    /// Invalid argument
53    pub const EINVAL: Self = Self(22);
54    /// File table overflow
55    pub const ENFILE: Self = Self(23);
56    /// Too many open files
57    pub const EMFILE: Self = Self(24);
58    /// Not a typewriter
59    pub const ENOTTY: Self = Self(25);
60    /// Text file busy
61    pub const ETXTBSY: Self = Self(26);
62    /// File too large
63    pub const EFBIG: Self = Self(27);
64    /// No space left on device
65    pub const ENOSPC: Self = Self(28);
66    /// Illegal seek
67    pub const ESPIPE: Self = Self(29);
68    /// Read-only file system
69    pub const EROFS: Self = Self(30);
70    /// Too many links
71    pub const EMLINK: Self = Self(31);
72    /// Broken pipe
73    pub const EPIPE: Self = Self(32);
74    /// Math argument out of domain of func
75    pub const EDOM: Self = Self(33);
76    /// Math result not representable
77    pub const ERANGE: Self = Self(34);
78    /// Try again
79    pub const EAGAIN: Self = Self(35);
80    /// Operation now in progress
81    pub const EINPROGRESS: Self = Self(36);
82    /// Operation already in progress
83    pub const EALREADY: Self = Self(37);
84    /// Socket operation on non-socket
85    pub const ENOTSOCK: Self = Self(38);
86    /// Destination address required
87    pub const EDESTADDRREQ: Self = Self(39);
88    /// Message too long
89    pub const EMSGSIZE: Self = Self(40);
90    /// Protocol wrong type for socket
91    pub const EPROTOTYPE: Self = Self(41);
92    /// Protocol not available
93    pub const ENOPROTOOPT: Self = Self(42);
94    /// Protocol not supported
95    pub const EPROTONOSUPPORT: Self = Self(43);
96    /// Socket type not supported
97    pub const ESOCKTNOSUPPORT: Self = Self(44);
98    /// Operation not supported on transport endpoint
99    pub const EOPNOTSUPP: Self = Self(45);
100    /// Protocol family not supported
101    pub const EPFNOSUPPORT: Self = Self(46);
102    /// Address family not supported by protocol
103    pub const EAFNOSUPPORT: Self = Self(47);
104    /// Address already in use
105    pub const EADDRINUSE: Self = Self(48);
106    /// Cannot assign requested address
107    pub const EADDRNOTAVAIL: Self = Self(49);
108    /// Network is down
109    pub const ENETDOWN: Self = Self(50);
110    /// Network is unreachable
111    pub const ENETUNREACH: Self = Self(51);
112    /// Network dropped connection because of reset
113    pub const ENETRESET: Self = Self(52);
114    /// Software caused connection abort
115    pub const ECONNABORTED: Self = Self(53);
116    /// Connection reset by peer
117    pub const ECONNRESET: Self = Self(54);
118    /// No buffer space available
119    pub const ENOBUFS: Self = Self(55);
120    /// Transport endpoint is already connected
121    pub const EISCONN: Self = Self(56);
122    /// Transport endpoint is not connected
123    pub const ENOTCONN: Self = Self(57);
124    /// Cannot send after transport endpoint shutdown
125    pub const ESHUTDOWN: Self = Self(58);
126    /// Too many references: cannot splice
127    pub const ETOOMANYREFS: Self = Self(59);
128    /// Connection timed out
129    pub const ETIMEDOUT: Self = Self(60);
130    /// Connection refused
131    pub const ECONNREFUSED: Self = Self(61);
132    /// Too many symbolic links encountered
133    pub const ELOOP: Self = Self(62);
134    /// File name too long
135    pub const ENAMETOOLONG: Self = Self(63);
136    /// Host is down
137    pub const EHOSTDOWN: Self = Self(64);
138    /// No route to host
139    pub const EHOSTUNREACH: Self = Self(65);
140    /// Directory not empty
141    pub const ENOTEMPTY: Self = Self(66);
142    /// Too many users
143    pub const EUSERS: Self = Self(68);
144    /// Quota exceeded
145    pub const EDQUOT: Self = Self(69);
146    /// Stale file handle
147    pub const ESTALE: Self = Self(70);
148    /// Object is remote
149    pub const EREMOTE: Self = Self(71);
150    /// No record locks available
151    pub const ENOLCK: Self = Self(77);
152    /// Function not implemented
153    pub const ENOSYS: Self = Self(78);
154    /// No message of desired type
155    pub const ENOMSG: Self = Self(80);
156    /// Identifier removed
157    pub const EIDRM: Self = Self(81);
158    /// Out of streams resources
159    pub const ENOSR: Self = Self(82);
160    /// Timer expired
161    pub const ETIME: Self = Self(83);
162    /// Not a data message
163    pub const EBADMSG: Self = Self(84);
164    /// Protocol error
165    pub const EPROTO: Self = Self(85);
166    /// No data available
167    pub const ENODATA: Self = Self(86);
168    /// Device not a stream
169    pub const ENOSTR: Self = Self(87);
170    /// Channel number out of range
171    pub const ECHRNG: Self = Self(88);
172    /// Level 2 not synchronized
173    pub const EL2NSYNC: Self = Self(89);
174    /// Level 3 halted
175    pub const EL3HLT: Self = Self(90);
176    /// Level 3 reset
177    pub const EL3RST: Self = Self(91);
178    /// Package not installed
179    pub const ENOPKG: Self = Self(92);
180    /// Link number out of range
181    pub const ELNRNG: Self = Self(93);
182    /// Protocol driver not attached
183    pub const EUNATCH: Self = Self(94);
184    /// No CSI structure available
185    pub const ENOCSI: Self = Self(95);
186    /// Level 2 halted
187    pub const EL2HLT: Self = Self(96);
188    /// Invalid exchange
189    pub const EBADE: Self = Self(97);
190    /// Invalid request descriptor
191    pub const EBADR: Self = Self(98);
192    /// Exchange full
193    pub const EXFULL: Self = Self(99);
194    /// No anode
195    pub const ENOANO: Self = Self(100);
196    /// Invalid request code
197    pub const EBADRQC: Self = Self(101);
198    /// Invalid slot
199    pub const EBADSLT: Self = Self(102);
200    /// Bad font file format
201    pub const EBFONT: Self = Self(104);
202    /// Machine is not on the network
203    pub const ENONET: Self = Self(105);
204    /// Link has been severed
205    pub const ENOLINK: Self = Self(106);
206    /// Advertise error
207    pub const EADV: Self = Self(107);
208    /// Srmount error
209    pub const ESRMNT: Self = Self(108);
210    /// Communication error on send
211    pub const ECOMM: Self = Self(109);
212    /// Multihop attempted
213    pub const EMULTIHOP: Self = Self(110);
214    /// RFS specific error
215    pub const EDOTDOT: Self = Self(111);
216    /// Value too large for defined data type
217    pub const EOVERFLOW: Self = Self(112);
218    /// Name not unique on network
219    pub const ENOTUNIQ: Self = Self(113);
220    /// File descriptor in bad state
221    pub const EBADFD: Self = Self(114);
222    /// Remote address changed
223    pub const EREMCHG: Self = Self(115);
224    /// Illegal byte sequence
225    pub const EILSEQ: Self = Self(116);
226    /// Structure needs cleaning
227    pub const EUCLEAN: Self = Self(117);
228    /// Not a XENIX named type file
229    pub const ENOTNAM: Self = Self(118);
230    /// No XENIX semaphores available
231    pub const ENAVAIL: Self = Self(119);
232    /// Is a named type file
233    pub const EISNAM: Self = Self(120);
234    /// Remote I/O error
235    pub const EREMOTEIO: Self = Self(121);
236    /// Can not access a needed shared library
237    pub const ELIBACC: Self = Self(122);
238    /// Accessing a corrupted shared library
239    pub const ELIBBAD: Self = Self(123);
240    /// .lib section in a.out corrupted
241    pub const ELIBSCN: Self = Self(124);
242    /// Attempting to link in too many shared libraries
243    pub const ELIBMAX: Self = Self(125);
244    /// Cannot exec a shared library directly
245    pub const ELIBEXEC: Self = Self(126);
246    /// Interrupted system call should be restarted
247    pub const ERESTART: Self = Self(127);
248    /// Streams pipe error
249    pub const ESTRPIPE: Self = Self(128);
250    /// No medium found
251    pub const ENOMEDIUM: Self = Self(129);
252    /// Wrong medium type
253    pub const EMEDIUMTYPE: Self = Self(130);
254    /// Operation Cancelled
255    pub const ECANCELED: Self = Self(131);
256    /// Required key not available
257    pub const ENOKEY: Self = Self(132);
258    /// Key has expired
259    pub const EKEYEXPIRED: Self = Self(133);
260    /// Key has been revoked
261    pub const EKEYREVOKED: Self = Self(134);
262    /// Key was rejected by service
263    pub const EKEYREJECTED: Self = Self(135);
264    /// Owner died
265    pub const EOWNERDEAD: Self = Self(136);
266    /// State not recoverable
267    pub const ENOTRECOVERABLE: Self = Self(137);
268    /// Operation not possible due to RF-kill
269    pub const ERFKILL: Self = Self(138);
270    /// Memory page has hardware error
271    pub const EHWPOISON: Self = Self(139);
272    /// Restart syscall
273    pub const ERESTARTSYS: Self = Self(512);
274    /// Restart if no interrupt
275    pub const ERESTARTNOINTR: Self = Self(513);
276    /// restart if no handler..
277    pub const ERESTARTNOHAND: Self = Self(514);
278    /// No ioctl command
279    pub const ENOIOCTLCMD: Self = Self(515);
280    /// restart by calling sys_restart_syscall
281    pub const ERESTART_RESTARTBLOCK: Self = Self(516);
282    /// Driver requests probe retry
283    pub const EPROBE_DEFER: Self = Self(517);
284    /// open found a stale dentry
285    pub const EOPENSTALE: Self = Self(518);
286    /// Parameter not supported
287    pub const ENOPARAM: Self = Self(519);
288    /// Illegal NFS file handle
289    pub const EBADHANDLE: Self = Self(521);
290    /// Update synchronization mismatch
291    pub const ENOTSYNC: Self = Self(522);
292    /// Cookie is stale
293    pub const EBADCOOKIE: Self = Self(523);
294    /// Operation is not supported
295    pub const ENOTSUPP: Self = Self(524);
296    /// Buffer or request is too small
297    pub const ETOOSMALL: Self = Self(525);
298    /// An untranslatable error occurred
299    pub const ESERVERFAULT: Self = Self(526);
300    /// Type not supported by server
301    pub const EBADTYPE: Self = Self(527);
302    /// Request initiated, but will not complete before timeout
303    pub const EJUKEBOX: Self = Self(528);
304    /// iocb queued, will get completion event
305    pub const EIOCBQUEUED: Self = Self(529);
306    /// conflict with recalled state
307    pub const ERECALLCONFLICT: Self = Self(530);
308    /// NFS file lock reclaim refused
309    pub const ENOGRACE: Self = Self(531);
310    /// Alias for [Self::EDEADLK]
311    pub const EDEADLOCK: Self = Self::EDEADLK;
312    /// Alias for [Self::EAGAIN]
313    pub const EWOULDBLOCK: Self = Self::EAGAIN;
314
315    pub const MIN: i32 = 1;
316    pub const MAX: i32 = 531;
317
318    #[cfg(feature = "iter")]
319    const ALL: [i32; 150] = [
320        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,
321        26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
322        49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 77,
323        78, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
324        101, 102, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
325        120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
326        138, 139, 512, 513, 514, 515, 516, 517, 518, 519, 521, 522, 523, 524, 525, 526, 527, 528,
327        529, 530, 531,
328    ];
329
330    pub(crate) fn name_and_description(&self) -> Option<(&'static str, &'static str)> {
331        match self.0 {
332            1 => Some(("EPERM", "Operation not permitted")),
333            2 => Some(("ENOENT", "No such file or directory")),
334            3 => Some(("ESRCH", "No such process")),
335            4 => Some(("EINTR", "Interrupted system call")),
336            5 => Some(("EIO", "I/O error")),
337            6 => Some(("ENXIO", "No such device or address")),
338            7 => Some(("E2BIG", "Argument list too long")),
339            8 => Some(("ENOEXEC", "Exec format error")),
340            9 => Some(("EBADF", "Bad file number")),
341            10 => Some(("ECHILD", "No child processes")),
342            11 => Some(("EDEADLK", "Resource deadlock would occur")),
343            12 => Some(("ENOMEM", "Out of memory")),
344            13 => Some(("EACCES", "Permission denied")),
345            14 => Some(("EFAULT", "Bad address")),
346            15 => Some(("ENOTBLK", "Block device required")),
347            16 => Some(("EBUSY", "Device or resource busy")),
348            17 => Some(("EEXIST", "File exists")),
349            18 => Some(("EXDEV", "Cross-device link")),
350            19 => Some(("ENODEV", "No such device")),
351            20 => Some(("ENOTDIR", "Not a directory")),
352            21 => Some(("EISDIR", "Is a directory")),
353            22 => Some(("EINVAL", "Invalid argument")),
354            23 => Some(("ENFILE", "File table overflow")),
355            24 => Some(("EMFILE", "Too many open files")),
356            25 => Some(("ENOTTY", "Not a typewriter")),
357            26 => Some(("ETXTBSY", "Text file busy")),
358            27 => Some(("EFBIG", "File too large")),
359            28 => Some(("ENOSPC", "No space left on device")),
360            29 => Some(("ESPIPE", "Illegal seek")),
361            30 => Some(("EROFS", "Read-only file system")),
362            31 => Some(("EMLINK", "Too many links")),
363            32 => Some(("EPIPE", "Broken pipe")),
364            33 => Some(("EDOM", "Math argument out of domain of func")),
365            34 => Some(("ERANGE", "Math result not representable")),
366            35 => Some(("EAGAIN", "Try again")),
367            36 => Some(("EINPROGRESS", "Operation now in progress")),
368            37 => Some(("EALREADY", "Operation already in progress")),
369            38 => Some(("ENOTSOCK", "Socket operation on non-socket")),
370            39 => Some(("EDESTADDRREQ", "Destination address required")),
371            40 => Some(("EMSGSIZE", "Message too long")),
372            41 => Some(("EPROTOTYPE", "Protocol wrong type for socket")),
373            42 => Some(("ENOPROTOOPT", "Protocol not available")),
374            43 => Some(("EPROTONOSUPPORT", "Protocol not supported")),
375            44 => Some(("ESOCKTNOSUPPORT", "Socket type not supported")),
376            45 => Some((
377                "EOPNOTSUPP",
378                "Operation not supported on transport endpoint",
379            )),
380            46 => Some(("EPFNOSUPPORT", "Protocol family not supported")),
381            47 => Some(("EAFNOSUPPORT", "Address family not supported by protocol")),
382            48 => Some(("EADDRINUSE", "Address already in use")),
383            49 => Some(("EADDRNOTAVAIL", "Cannot assign requested address")),
384            50 => Some(("ENETDOWN", "Network is down")),
385            51 => Some(("ENETUNREACH", "Network is unreachable")),
386            52 => Some(("ENETRESET", "Network dropped connection because of reset")),
387            53 => Some(("ECONNABORTED", "Software caused connection abort")),
388            54 => Some(("ECONNRESET", "Connection reset by peer")),
389            55 => Some(("ENOBUFS", "No buffer space available")),
390            56 => Some(("EISCONN", "Transport endpoint is already connected")),
391            57 => Some(("ENOTCONN", "Transport endpoint is not connected")),
392            58 => Some(("ESHUTDOWN", "Cannot send after transport endpoint shutdown")),
393            59 => Some(("ETOOMANYREFS", "Too many references: cannot splice")),
394            60 => Some(("ETIMEDOUT", "Connection timed out")),
395            61 => Some(("ECONNREFUSED", "Connection refused")),
396            62 => Some(("ELOOP", "Too many symbolic links encountered")),
397            63 => Some(("ENAMETOOLONG", "File name too long")),
398            64 => Some(("EHOSTDOWN", "Host is down")),
399            65 => Some(("EHOSTUNREACH", "No route to host")),
400            66 => Some(("ENOTEMPTY", "Directory not empty")),
401            68 => Some(("EUSERS", "Too many users")),
402            69 => Some(("EDQUOT", "Quota exceeded")),
403            70 => Some(("ESTALE", "Stale file handle")),
404            71 => Some(("EREMOTE", "Object is remote")),
405            77 => Some(("ENOLCK", "No record locks available")),
406            78 => Some(("ENOSYS", "Function not implemented")),
407            80 => Some(("ENOMSG", "No message of desired type")),
408            81 => Some(("EIDRM", "Identifier removed")),
409            82 => Some(("ENOSR", "Out of streams resources")),
410            83 => Some(("ETIME", "Timer expired")),
411            84 => Some(("EBADMSG", "Not a data message")),
412            85 => Some(("EPROTO", "Protocol error")),
413            86 => Some(("ENODATA", "No data available")),
414            87 => Some(("ENOSTR", "Device not a stream")),
415            88 => Some(("ECHRNG", "Channel number out of range")),
416            89 => Some(("EL2NSYNC", "Level 2 not synchronized")),
417            90 => Some(("EL3HLT", "Level 3 halted")),
418            91 => Some(("EL3RST", "Level 3 reset")),
419            92 => Some(("ENOPKG", "Package not installed")),
420            93 => Some(("ELNRNG", "Link number out of range")),
421            94 => Some(("EUNATCH", "Protocol driver not attached")),
422            95 => Some(("ENOCSI", "No CSI structure available")),
423            96 => Some(("EL2HLT", "Level 2 halted")),
424            97 => Some(("EBADE", "Invalid exchange")),
425            98 => Some(("EBADR", "Invalid request descriptor")),
426            99 => Some(("EXFULL", "Exchange full")),
427            100 => Some(("ENOANO", "No anode")),
428            101 => Some(("EBADRQC", "Invalid request code")),
429            102 => Some(("EBADSLT", "Invalid slot")),
430            104 => Some(("EBFONT", "Bad font file format")),
431            105 => Some(("ENONET", "Machine is not on the network")),
432            106 => Some(("ENOLINK", "Link has been severed")),
433            107 => Some(("EADV", "Advertise error")),
434            108 => Some(("ESRMNT", "Srmount error")),
435            109 => Some(("ECOMM", "Communication error on send")),
436            110 => Some(("EMULTIHOP", "Multihop attempted")),
437            111 => Some(("EDOTDOT", "RFS specific error")),
438            112 => Some(("EOVERFLOW", "Value too large for defined data type")),
439            113 => Some(("ENOTUNIQ", "Name not unique on network")),
440            114 => Some(("EBADFD", "File descriptor in bad state")),
441            115 => Some(("EREMCHG", "Remote address changed")),
442            116 => Some(("EILSEQ", "Illegal byte sequence")),
443            117 => Some(("EUCLEAN", "Structure needs cleaning")),
444            118 => Some(("ENOTNAM", "Not a XENIX named type file")),
445            119 => Some(("ENAVAIL", "No XENIX semaphores available")),
446            120 => Some(("EISNAM", "Is a named type file")),
447            121 => Some(("EREMOTEIO", "Remote I/O error")),
448            122 => Some(("ELIBACC", "Can not access a needed shared library")),
449            123 => Some(("ELIBBAD", "Accessing a corrupted shared library")),
450            124 => Some(("ELIBSCN", ".lib section in a.out corrupted")),
451            125 => Some(("ELIBMAX", "Attempting to link in too many shared libraries")),
452            126 => Some(("ELIBEXEC", "Cannot exec a shared library directly")),
453            127 => Some(("ERESTART", "Interrupted system call should be restarted")),
454            128 => Some(("ESTRPIPE", "Streams pipe error")),
455            129 => Some(("ENOMEDIUM", "No medium found")),
456            130 => Some(("EMEDIUMTYPE", "Wrong medium type")),
457            131 => Some(("ECANCELED", "Operation Cancelled")),
458            132 => Some(("ENOKEY", "Required key not available")),
459            133 => Some(("EKEYEXPIRED", "Key has expired")),
460            134 => Some(("EKEYREVOKED", "Key has been revoked")),
461            135 => Some(("EKEYREJECTED", "Key was rejected by service")),
462            136 => Some(("EOWNERDEAD", "Owner died")),
463            137 => Some(("ENOTRECOVERABLE", "State not recoverable")),
464            138 => Some(("ERFKILL", "Operation not possible due to RF-kill")),
465            139 => Some(("EHWPOISON", "Memory page has hardware error")),
466            512 => Some(("ERESTARTSYS", "Restart syscall")),
467            513 => Some(("ERESTARTNOINTR", "Restart if no interrupt")),
468            514 => Some(("ERESTARTNOHAND", "restart if no handler..")),
469            515 => Some(("ENOIOCTLCMD", "No ioctl command")),
470            516 => Some((
471                "ERESTART_RESTARTBLOCK",
472                "restart by calling sys_restart_syscall",
473            )),
474            517 => Some(("EPROBE_DEFER", "Driver requests probe retry")),
475            518 => Some(("EOPENSTALE", "open found a stale dentry")),
476            519 => Some(("ENOPARAM", "Parameter not supported")),
477            521 => Some(("EBADHANDLE", "Illegal NFS file handle")),
478            522 => Some(("ENOTSYNC", "Update synchronization mismatch")),
479            523 => Some(("EBADCOOKIE", "Cookie is stale")),
480            524 => Some(("ENOTSUPP", "Operation is not supported")),
481            525 => Some(("ETOOSMALL", "Buffer or request is too small")),
482            526 => Some(("ESERVERFAULT", "An untranslatable error occurred")),
483            527 => Some(("EBADTYPE", "Type not supported by server")),
484            528 => Some((
485                "EJUKEBOX",
486                "Request initiated, but will not complete before timeout",
487            )),
488            529 => Some(("EIOCBQUEUED", "iocb queued, will get completion event")),
489            530 => Some(("ERECALLCONFLICT", "conflict with recalled state")),
490            531 => Some(("ENOGRACE", "NFS file lock reclaim refused")),
491            _ => None,
492        }
493    }
494}