/
errno.h
433 lines (298 loc) · 9.02 KB
/
errno.h
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
/**
* @section License
*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017, Erik Moqvist
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* This file is part of the Simba project.
*/
#ifndef __ERRNO_H__
#define __ERRNO_H__
/** Operation not permitted. */
#define EPERM 1
/** No such file or directory. */
#define ENOENT 2
/** No such process. */
#define ESRCH 3
/** Interrupted system call. */
#define EINTR 4
/** I/O error. */
#define EIO 5
/** No such device or address. */
#define ENXIO 6
/** Argument list too long. */
#define E2BIG 7
/** Exec format error. */
#define ENOEXEC 8
/** Bad file number. */
#define EBADF 9
/** No child processes. */
#define ECHILD 10
/** Try again. */
#define EAGAIN 11
/** Out of memory. */
#define ENOMEM 12
/** Permission denied. */
#define EACCES 13
/** Bad address. */
#define EFAULT 14
/** Block device required. */
#define ENOTBLK 15
/** Device or resource busy. */
#define EBUSY 16
/** File exists. */
#define EEXIST 17
/** Cross-device link. */
#define EXDEV 18
/** No such device. */
#define ENODEV 19
/** Not a directory. */
#define ENOTDIR 20
/** Is a directory. */
#define EISDIR 21
/** Invalid argument. */
#define EINVAL 22
/** File table overflow. */
#define ENFILE 23
/** Too many open files. */
#define EMFILE 24
/** Not a typewriter. */
#define ENOTTY 25
/** Text file busy. */
#define ETXTBSY 26
/** File too large. */
#define EFBIG 27
/** No space left on device. */
#define ENOSPC 28
/** Illegal seek. */
#define ESPIPE 29
/** Read-only file system. */
#define EROFS 30
/** Too many links. */
#define EMLINK 31
/** Broken pipe. */
#define EPIPE 32
/** Math argument out of domain of func. */
#define EDOM 33
/** Math result not representable. */
#define ERANGE 34
/** Resource deadlock would occur. */
#define EDEADLK 35
/** File name too long. */
#define ENAMETOOLONG 36
/** No record locks available. */
#define ENOLCK 37
/** Function not implemented. */
#define ENOSYS 38
/** Directory not empty. */
#define ENOTEMPTY 39
/** Too many symbolic links encountered. */
#define ELOOP 40
/** Operation would block. */
#define EWOULDBLOCK EAGAIN
/** No message of desired type. */
#define ENOMSG 42
/** Identifier removed. */
#define EIDRM 43
/** Channel number out of range. */
#define ECHRNG 44
/** Level 2 not synchronized. */
#define EL2NSYNC 45
/** Level 3 halted. */
#define EL3HLT 46
/** Level 3 reset. */
#define EL3RST 47
/** Link number out of range. */
#define ELNRNG 48
/** Protocol driver not attached. */
#define EUNATCH 49
/** No CSI structure available. */
#define ENOCSI 50
/** Level 2 halted. */
#define EL2HLT 51
/** Invalid exchange. */
#define EBADE 52
/** Invalid request descriptor. */
#define EBADR 53
/** Exchange full. */
#define EXFULL 54
/** No anode. */
#define ENOANO 55
/** Invalid request code. */
#define EBADRQC 56
/** Invalid slot. */
#define EBADSLT 57
/** Deadlock. */
#define EDEADLOCK EDEADLK
/** Bad font file format. */
#define EBFONT 59
/** Device not a stream. */
#define ENOSTR 60
/** No data available. */
#define ENODATA 61
/** Timer expired. */
#define ETIME 62
/** Out of streams resources. */
#define ENOSR 63
/** Machine is not on the network. */
#define ENONET 64
/** Package not installed. */
#define ENOPKG 65
/** Object is remote. */
#define EREMOTE 66
/** Link has been severed. */
#define ENOLINK 67
/** Advertise error. */
#define EADV 68
/** Srmount error. */
#define ESRMNT 69
/** Communication error on send. */
#define ECOMM 70
/** Protocol error. */
#define EPROTO 71
/** Multihop attempted. */
#define EMULTIHOP 72
/** RFS specific error. */
#define EDOTDOT 73
/** Not a data message. */
#define EBADMSG 74
/** Value too large for defined data type. */
#define EOVERFLOW 75
/** Name not unique on network. */
#define ENOTUNIQ 76
/** File descriptor in bad state. */
#define EBADFD 77
/** Remote address changed. */
#define EREMCHG 78
/** Can not access a needed shared library. */
#define ELIBACC 79
/** Accessing a corrupted shared library. */
#define ELIBBAD 80
/** .lib section in a.out corrupted. */
#define ELIBSCN 81
/** Attempting to link in too many shared libraries. */
#define ELIBMAX 82
/** Cannot exec a shared library directly. */
#define ELIBEXEC 83
/** Illegal byte sequence. */
#define EILSEQ 84
/** Interrupted system call should be restarted. */
#define ERESTART 85
/** Streams pipe error. */
#define ESTRPIPE 86
/** Too many users. */
#define EUSERS 87
/** Socket operation on non-socket. */
#define ENOTSOCK 88
/** Destination address required. */
#define EDESTADDRREQ 89
/** Message too long. */
#define EMSGSIZE 90
/** Protocol wrong type for socket. */
#define EPROTOTYPE 91
/** Protocol not available. */
#define ENOPROTOOPT 92
/** Protocol not supported. */
#define EPROTONOSUPBOARD 93
/** Socket type not supported. */
#define ESOCKTNOSUPBOARD 94
/** Operation not supported on transport endpoint. */
#define EOPNOTSUPP 95
/** Protocol family not supported. */
#define EPFNOSUPBOARD 96
/** Address family not supported by protocol. */
#define EAFNOSUPBOARD 97
/** Address already in use. */
#define EADDRINUSE 98
/** Cannot assign requested address. */
#define EADDRNOTAVAIL 99
/** Network is down. */
#define ENETDOWN 100
/** Network is unreachable. */
#define ENETUNREACH 101
/** Network dropped connection because of reset. */
#define ENETRESET 102
/** Software caused connection abort. */
#define ECONNABORTED 103
/** Connection reset by peer. */
#define ECONNRESET 104
/** No buffer space available. */
#define ENOBUFS 105
/** Transport endpoint is already connected. */
#define EISCONN 106
/** Transport endpoint is not connected. */
#define ENOTCONN 107
/** Cannot send after transport endpoint shutdown. */
#define ESHUTDOWN 108
/** Too many references: cannot splice. */
#define ETOOMANYREFS 109
/** Connection timed out. */
#define ETIMEDOUT 110
/** Connection refused. */
#define ECONNREFUSED 111
/** Host is down. */
#define EHOSTDOWN 112
/** No route to host. */
#define EHOSTUNREACH 113
/** Operation already in progress. */
#define EALREADY 114
/** Operation now in progress. */
#define EINPROGRESS 115
/** Stale NFS file handle. */
#define ESTALE 116
/** Structure needs cleaning. */
#define EUCLEAN 117
/** Not a XENIX named type file. */
#define ENOTNAM 118
/** No XENIX sems available. */
#define ENAVAIL 119
/** Is a named type file. */
#define EISNAM 120
/** Remote I/O error. */
#define EREMOTEIO 121
/** Quota exceeded. */
#define EDQUOT 122
/** No medium found. */
#define ENOMEDIUM 123
/** Wrong medium type. */
#define EMEDIUMTYPE 124
/** Operation Canceled. */
#define ECANCELED 125
/** Required key not available. */
#define ENOKEY 126
/** Key has expired. */
#define EKEYEXPIRED 127
/** Key has been revoked. */
#define EKEYREVOKED 128
/** Key was rejected by service. */
#define EKEYREJECTED 129
/** Stack corrupt. */
#define ESTACK 1000
/** Test assertion. */
#define EBTASSERT 1001
/** Assertion. */
#define EASSERT 1002
/** Command not found. */
#define ENOCOMMAND 1003
#endif