bsd_errnos/
dragonfly.rs

1#![allow(dead_code)]
2
3// This file automatically generate. Do not edit.
4
5use crate::Errno;
6impl Errno {
7    /// mfs: mountpoint released via vfs_start
8    pub const EMOUNTEXIT: Self = Self(-4);
9    /// ioctl not handled by this layer
10    pub const ENOIOCTL: Self = Self(-3);
11    /// don't modify regs, just return
12    pub const EJUSTRETURN: Self = Self(-2);
13    /// restart syscall
14    pub const ERESTART: Self = Self(-1);
15    /// Operation not permitted
16    pub const EPERM: Self = Self(1);
17    /// No such file or directory
18    pub const ENOENT: Self = Self(2);
19    /// No such process
20    pub const ESRCH: Self = Self(3);
21    /// Interrupted system call
22    pub const EINTR: Self = Self(4);
23    /// Input/output error
24    pub const EIO: Self = Self(5);
25    /// Device not configured
26    pub const ENXIO: Self = Self(6);
27    /// Argument list too long
28    pub const E2BIG: Self = Self(7);
29    /// Exec format error
30    pub const ENOEXEC: Self = Self(8);
31    /// Bad file descriptor
32    pub const EBADF: Self = Self(9);
33    /// No child processes
34    pub const ECHILD: Self = Self(10);
35    /// Resource deadlock avoided
36    pub const EDEADLK: Self = Self(11);
37    /// Cannot allocate memory
38    pub const ENOMEM: Self = Self(12);
39    /// Permission denied
40    pub const EACCES: Self = Self(13);
41    /// Bad address
42    pub const EFAULT: Self = Self(14);
43    /// Block device required
44    pub const ENOTBLK: Self = Self(15);
45    /// Device busy
46    pub const EBUSY: Self = Self(16);
47    /// File exists
48    pub const EEXIST: Self = Self(17);
49    /// Cross-device link
50    pub const EXDEV: Self = Self(18);
51    /// Operation not supported by device
52    pub const ENODEV: Self = Self(19);
53    /// Not a directory
54    pub const ENOTDIR: Self = Self(20);
55    /// Is a directory
56    pub const EISDIR: Self = Self(21);
57    /// Invalid argument
58    pub const EINVAL: Self = Self(22);
59    /// Too many open files in system
60    pub const ENFILE: Self = Self(23);
61    /// Too many open files
62    pub const EMFILE: Self = Self(24);
63    /// Inappropriate ioctl for device
64    pub const ENOTTY: Self = Self(25);
65    /// Text file busy
66    pub const ETXTBSY: Self = Self(26);
67    /// File too large
68    pub const EFBIG: Self = Self(27);
69    /// No space left on device
70    pub const ENOSPC: Self = Self(28);
71    /// Illegal seek
72    pub const ESPIPE: Self = Self(29);
73    /// Read-only filesystem
74    pub const EROFS: Self = Self(30);
75    /// Too many links
76    pub const EMLINK: Self = Self(31);
77    /// Broken pipe
78    pub const EPIPE: Self = Self(32);
79    /// Numerical argument out of domain
80    pub const EDOM: Self = Self(33);
81    /// Result too large
82    pub const ERANGE: Self = Self(34);
83    /// Resource temporarily unavailable
84    pub const EAGAIN: Self = Self(35);
85    /// Operation now in progress
86    pub const EINPROGRESS: Self = Self(36);
87    /// Operation already in progress
88    pub const EALREADY: Self = Self(37);
89    /// Socket operation on non-socket
90    pub const ENOTSOCK: Self = Self(38);
91    /// Destination address required
92    pub const EDESTADDRREQ: Self = Self(39);
93    /// Message too long
94    pub const EMSGSIZE: Self = Self(40);
95    /// Protocol wrong type for socket
96    pub const EPROTOTYPE: Self = Self(41);
97    /// Protocol not available
98    pub const ENOPROTOOPT: Self = Self(42);
99    /// Protocol not supported
100    pub const EPROTONOSUPPORT: Self = Self(43);
101    /// Socket type not supported
102    pub const ESOCKTNOSUPPORT: Self = Self(44);
103    /// Operation not supported
104    pub const EOPNOTSUPP: Self = Self(45);
105    /// Protocol family not supported
106    pub const EPFNOSUPPORT: Self = Self(46);
107    /// Address family not supported by protocol family
108    pub const EAFNOSUPPORT: Self = Self(47);
109    /// Address already in use
110    pub const EADDRINUSE: Self = Self(48);
111    /// Can't assign requested address
112    pub const EADDRNOTAVAIL: Self = Self(49);
113    /// Network is down
114    pub const ENETDOWN: Self = Self(50);
115    /// Network is unreachable
116    pub const ENETUNREACH: Self = Self(51);
117    /// Network dropped connection on reset
118    pub const ENETRESET: Self = Self(52);
119    /// Software caused connection abort
120    pub const ECONNABORTED: Self = Self(53);
121    /// Connection reset by peer
122    pub const ECONNRESET: Self = Self(54);
123    /// No buffer space available
124    pub const ENOBUFS: Self = Self(55);
125    /// Socket is already connected
126    pub const EISCONN: Self = Self(56);
127    /// Socket is not connected
128    pub const ENOTCONN: Self = Self(57);
129    /// Can't send after socket shutdown
130    pub const ESHUTDOWN: Self = Self(58);
131    /// Too many references: can't splice
132    pub const ETOOMANYREFS: Self = Self(59);
133    /// Operation timed out
134    pub const ETIMEDOUT: Self = Self(60);
135    /// Connection refused
136    pub const ECONNREFUSED: Self = Self(61);
137    /// Too many levels of symbolic links
138    pub const ELOOP: Self = Self(62);
139    /// File name too long
140    pub const ENAMETOOLONG: Self = Self(63);
141    /// Host is down
142    pub const EHOSTDOWN: Self = Self(64);
143    /// No route to host
144    pub const EHOSTUNREACH: Self = Self(65);
145    /// Directory not empty
146    pub const ENOTEMPTY: Self = Self(66);
147    /// Too many processes
148    pub const EPROCLIM: Self = Self(67);
149    /// Too many users
150    pub const EUSERS: Self = Self(68);
151    /// Disc quota exceeded
152    pub const EDQUOT: Self = Self(69);
153    /// Stale NFS file handle
154    pub const ESTALE: Self = Self(70);
155    /// Too many levels of remote in path
156    pub const EREMOTE: Self = Self(71);
157    /// RPC struct is bad
158    pub const EBADRPC: Self = Self(72);
159    /// RPC version wrong
160    pub const ERPCMISMATCH: Self = Self(73);
161    /// RPC prog. not avail
162    pub const EPROGUNAVAIL: Self = Self(74);
163    /// Program version wrong
164    pub const EPROGMISMATCH: Self = Self(75);
165    /// Bad procedure for program
166    pub const EPROCUNAVAIL: Self = Self(76);
167    /// No locks available
168    pub const ENOLCK: Self = Self(77);
169    /// Function not implemented
170    pub const ENOSYS: Self = Self(78);
171    /// Inappropriate file type or format
172    pub const EFTYPE: Self = Self(79);
173    /// Authentication error
174    pub const EAUTH: Self = Self(80);
175    /// Need authenticator
176    pub const ENEEDAUTH: Self = Self(81);
177    /// Identifier removed
178    pub const EIDRM: Self = Self(82);
179    /// No message of desired type
180    pub const ENOMSG: Self = Self(83);
181    /// Value too large to be stored in data type
182    pub const EOVERFLOW: Self = Self(84);
183    /// Operation canceled
184    pub const ECANCELED: Self = Self(85);
185    /// Illegal byte sequence
186    pub const EILSEQ: Self = Self(86);
187    /// Attribute not found
188    pub const ENOATTR: Self = Self(87);
189    /// Programming error
190    pub const EDOOFUS: Self = Self(88);
191    /// Bad message
192    pub const EBADMSG: Self = Self(89);
193    /// Multihop attempted
194    pub const EMULTIHOP: Self = Self(90);
195    /// Link has been severed
196    pub const ENOLINK: Self = Self(91);
197    /// Protocol error
198    pub const EPROTO: Self = Self(92);
199    /// linux
200    pub const ENOMEDIUM: Self = Self(93);
201    /// State not recoverable
202    pub const ENOTRECOVERABLE: Self = Self(94);
203    /// Previous owner died
204    pub const EOWNERDEAD: Self = Self(95);
205    /// XXX
206    pub const EASYNC: Self = Self(99);
207    /// Alias for [Self::EOPNOTSUPP]
208    pub const ENOTSUP: Self = Self::EOPNOTSUPP;
209    /// Alias for [Self::EAGAIN]
210    pub const EWOULDBLOCK: Self = Self::EAGAIN;
211
212    pub const MIN: i32 = -4;
213    pub const MAX: i32 = 99;
214
215    #[cfg(feature = "iter")]
216    pub(crate) const ALL: [i32; 100] = [
217        -4, -3, -2, -1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
218        22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
219        45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
220        68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
221        91, 92, 93, 94, 95, 99,
222    ];
223
224    pub(crate) fn name_and_description(&self) -> Option<(&'static str, &'static str)> {
225        match self.0 {
226            -4 => Some(("EMOUNTEXIT", "mfs: mountpoint released via vfs_start")),
227            -3 => Some(("ENOIOCTL", "ioctl not handled by this layer")),
228            -2 => Some(("EJUSTRETURN", "don't modify regs, just return")),
229            -1 => Some(("ERESTART", "restart syscall")),
230            1 => Some(("EPERM", "Operation not permitted")),
231            2 => Some(("ENOENT", "No such file or directory")),
232            3 => Some(("ESRCH", "No such process")),
233            4 => Some(("EINTR", "Interrupted system call")),
234            5 => Some(("EIO", "Input/output error")),
235            6 => Some(("ENXIO", "Device not configured")),
236            7 => Some(("E2BIG", "Argument list too long")),
237            8 => Some(("ENOEXEC", "Exec format error")),
238            9 => Some(("EBADF", "Bad file descriptor")),
239            10 => Some(("ECHILD", "No child processes")),
240            11 => Some(("EDEADLK", "Resource deadlock avoided")),
241            12 => Some(("ENOMEM", "Cannot allocate memory")),
242            13 => Some(("EACCES", "Permission denied")),
243            14 => Some(("EFAULT", "Bad address")),
244            15 => Some(("ENOTBLK", "Block device required")),
245            16 => Some(("EBUSY", "Device busy")),
246            17 => Some(("EEXIST", "File exists")),
247            18 => Some(("EXDEV", "Cross-device link")),
248            19 => Some(("ENODEV", "Operation not supported by device")),
249            20 => Some(("ENOTDIR", "Not a directory")),
250            21 => Some(("EISDIR", "Is a directory")),
251            22 => Some(("EINVAL", "Invalid argument")),
252            23 => Some(("ENFILE", "Too many open files in system")),
253            24 => Some(("EMFILE", "Too many open files")),
254            25 => Some(("ENOTTY", "Inappropriate ioctl for device")),
255            26 => Some(("ETXTBSY", "Text file busy")),
256            27 => Some(("EFBIG", "File too large")),
257            28 => Some(("ENOSPC", "No space left on device")),
258            29 => Some(("ESPIPE", "Illegal seek")),
259            30 => Some(("EROFS", "Read-only filesystem")),
260            31 => Some(("EMLINK", "Too many links")),
261            32 => Some(("EPIPE", "Broken pipe")),
262            33 => Some(("EDOM", "Numerical argument out of domain")),
263            34 => Some(("ERANGE", "Result too large")),
264            35 => Some(("EAGAIN", "Resource temporarily unavailable")),
265            36 => Some(("EINPROGRESS", "Operation now in progress")),
266            37 => Some(("EALREADY", "Operation already in progress")),
267            38 => Some(("ENOTSOCK", "Socket operation on non-socket")),
268            39 => Some(("EDESTADDRREQ", "Destination address required")),
269            40 => Some(("EMSGSIZE", "Message too long")),
270            41 => Some(("EPROTOTYPE", "Protocol wrong type for socket")),
271            42 => Some(("ENOPROTOOPT", "Protocol not available")),
272            43 => Some(("EPROTONOSUPPORT", "Protocol not supported")),
273            44 => Some(("ESOCKTNOSUPPORT", "Socket type not supported")),
274            45 => Some(("EOPNOTSUPP", "Operation not supported")),
275            46 => Some(("EPFNOSUPPORT", "Protocol family not supported")),
276            47 => Some((
277                "EAFNOSUPPORT",
278                "Address family not supported by protocol family",
279            )),
280            48 => Some(("EADDRINUSE", "Address already in use")),
281            49 => Some(("EADDRNOTAVAIL", "Can't assign requested address")),
282            50 => Some(("ENETDOWN", "Network is down")),
283            51 => Some(("ENETUNREACH", "Network is unreachable")),
284            52 => Some(("ENETRESET", "Network dropped connection on reset")),
285            53 => Some(("ECONNABORTED", "Software caused connection abort")),
286            54 => Some(("ECONNRESET", "Connection reset by peer")),
287            55 => Some(("ENOBUFS", "No buffer space available")),
288            56 => Some(("EISCONN", "Socket is already connected")),
289            57 => Some(("ENOTCONN", "Socket is not connected")),
290            58 => Some(("ESHUTDOWN", "Can't send after socket shutdown")),
291            59 => Some(("ETOOMANYREFS", "Too many references: can't splice")),
292            60 => Some(("ETIMEDOUT", "Operation timed out")),
293            61 => Some(("ECONNREFUSED", "Connection refused")),
294            62 => Some(("ELOOP", "Too many levels of symbolic links")),
295            63 => Some(("ENAMETOOLONG", "File name too long")),
296            64 => Some(("EHOSTDOWN", "Host is down")),
297            65 => Some(("EHOSTUNREACH", "No route to host")),
298            66 => Some(("ENOTEMPTY", "Directory not empty")),
299            67 => Some(("EPROCLIM", "Too many processes")),
300            68 => Some(("EUSERS", "Too many users")),
301            69 => Some(("EDQUOT", "Disc quota exceeded")),
302            70 => Some(("ESTALE", "Stale NFS file handle")),
303            71 => Some(("EREMOTE", "Too many levels of remote in path")),
304            72 => Some(("EBADRPC", "RPC struct is bad")),
305            73 => Some(("ERPCMISMATCH", "RPC version wrong")),
306            74 => Some(("EPROGUNAVAIL", "RPC prog. not avail")),
307            75 => Some(("EPROGMISMATCH", "Program version wrong")),
308            76 => Some(("EPROCUNAVAIL", "Bad procedure for program")),
309            77 => Some(("ENOLCK", "No locks available")),
310            78 => Some(("ENOSYS", "Function not implemented")),
311            79 => Some(("EFTYPE", "Inappropriate file type or format")),
312            80 => Some(("EAUTH", "Authentication error")),
313            81 => Some(("ENEEDAUTH", "Need authenticator")),
314            82 => Some(("EIDRM", "Identifier removed")),
315            83 => Some(("ENOMSG", "No message of desired type")),
316            84 => Some(("EOVERFLOW", "Value too large to be stored in data type")),
317            85 => Some(("ECANCELED", "Operation canceled")),
318            86 => Some(("EILSEQ", "Illegal byte sequence")),
319            87 => Some(("ENOATTR", "Attribute not found")),
320            88 => Some(("EDOOFUS", "Programming error")),
321            89 => Some(("EBADMSG", "Bad message")),
322            90 => Some(("EMULTIHOP", "Multihop attempted")),
323            91 => Some(("ENOLINK", "Link has been severed")),
324            92 => Some(("EPROTO", "Protocol error")),
325            93 => Some(("ENOMEDIUM", "linux")),
326            94 => Some(("ENOTRECOVERABLE", "State not recoverable")),
327            95 => Some(("EOWNERDEAD", "Previous owner died")),
328            99 => Some(("EASYNC", "XXX")),
329            _ => None,
330        }
331    }
332}