linux_errnos/linux/
powerpc.rs

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