PatchworkOS
da8a090
A non-POSIX operating system.
Theme:
Default
Round
Robot
Loading...
Searching...
No Matches
errno.h
Go to the documentation of this file.
1
#ifndef _ERRNO_H
2
#define _ERRNO_H 1
3
4
#if defined(__cplusplus)
5
extern
"C"
6
{
7
#endif
8
9
#include "
_internal/ERR.h
"
10
#include "
_internal/config.h
"
11
12
int
*
_errno_get
(
void
);
13
14
/**
15
* @brief Error values.
16
* @ingroup libstd
17
* @defgroup libstd_errno Errno
18
*
19
* The errno values in Patchwork are taken from POSIX.
20
*
21
* @{
22
*/
23
24
/**
25
* @brief Error number variable.
26
*/
27
#define errno (*_errno_get())
28
29
/**
30
* @brief No error
31
*/
32
#define EOK 0
33
34
/**
35
* @brief Operation not permitted
36
*/
37
#define EPERM 1
38
39
/**
40
* @brief No such file or directory
41
*/
42
#define ENOENT 2
43
44
/**
45
* @brief No such process
46
*/
47
#define ESRCH 3
48
49
/**
50
* @brief Interrupted system call
51
*/
52
#define EINTR 4
53
54
/**
55
* @brief I/O error
56
*/
57
#define EIO 5
58
59
/**
60
* @brief No such device or address
61
*/
62
#define ENXIO 6
63
64
/**
65
* @brief Argument list too long
66
*/
67
#define E2BIG 7
68
69
/**
70
* @brief Exec format error
71
*/
72
#define ENOEXEC 8
73
74
/**
75
* @brief Bad file number
76
*/
77
#define EBADF 9
78
79
/**
80
* @brief No child processes
81
*/
82
#define ECHILD 10
83
84
/**
85
* @brief Try again
86
*/
87
#define EAGAIN 11
88
89
/**
90
* @brief Out of memory
91
*/
92
#define ENOMEM 12
93
94
/**
95
* @brief Permission denied
96
*/
97
#define EACCES 13
98
99
/**
100
* @brief Bad address
101
*/
102
#define EFAULT 14
103
104
/**
105
* @brief Block device required
106
*/
107
#define ENOTBLK 15
108
109
/**
110
* @brief Device or resource busy
111
*/
112
#define EBUSY 16
113
114
/**
115
* @brief File exists
116
*/
117
#define EEXIST 17
118
119
/**
120
* @brief Cross-device link
121
*/
122
#define EXDEV 18
123
124
/**
125
* @brief No such device
126
*/
127
#define ENODEV 19
128
129
/**
130
* @brief Not a directory
131
*/
132
#define ENOTDIR 20
133
134
/**
135
* @brief Is a directory
136
*/
137
#define EISDIR 21
138
139
/**
140
* @brief Invalid argument
141
*/
142
#define EINVAL 22
143
144
/**
145
* @brief File table overflow
146
*/
147
#define ENFILE 23
148
149
/**
150
* @brief Too many open files
151
*/
152
#define EMFILE 24
153
154
/**
155
* @brief Not a typewriter
156
*/
157
#define ENOTTY 25
158
159
/**
160
* @brief Text file busy
161
*/
162
#define ETXTBSY 26
163
164
/**
165
* @brief File too large
166
*/
167
#define EFBIG 27
168
169
/**
170
* @brief No space left on device
171
*/
172
#define ENOSPC 28
173
174
/**
175
* @brief Illegal seek
176
*/
177
#define ESPIPE 29
178
179
/**
180
* @brief Read-only file system
181
*/
182
#define EROFS 30
183
184
/**
185
* @brief Too many links
186
*/
187
#define EMLINK 31
188
189
/**
190
* @brief Broken pipe
191
*/
192
#define EPIPE 32
193
194
/**
195
* @brief Math argument out of domain of func
196
*/
197
#define EDOM 33
198
199
/**
200
* @brief Math result not representable
201
*/
202
#define ERANGE 34
203
204
/**
205
* @brief Resource deadlock would occur
206
*/
207
#define EDEADLK 35
208
209
/**
210
* @brief File name too long
211
*/
212
#define ENAMETOOLONG 36
213
214
/**
215
* @brief No record locks available
216
*/
217
#define ENOLCK 37
218
219
/**
220
* @brief Function not implemented
221
*/
222
#define ENOSYS 38
223
224
/**
225
* @brief Directory not empty
226
*/
227
#define ENOTEMPTY 39
228
229
/**
230
* @brief Too many symbolic links encountered
231
*/
232
#define ELOOP 40
233
234
/**
235
* @brief Operation would block
236
*/
237
#define EWOULDBLOCK EAGAIN
238
239
/**
240
* @brief No message of desired type
241
*/
242
#define ENOMSG 42
243
244
/**
245
* @brief Identifier removed
246
*/
247
#define EIDRM 43
248
249
/**
250
* @brief Channel number out of range
251
*/
252
#define ECHRNG 44
253
254
/**
255
* @brief Level 2 not synchronized
256
*/
257
#define EL2NSYNC 45
258
259
/**
260
* @brief Level 3 halted
261
*/
262
#define EL3HLT 46
263
264
/**
265
* @brief Level 3 reset
266
*/
267
#define EL3RST 47
268
269
/**
270
* @brief Link number out of range
271
*/
272
#define ELNRNG 48
273
274
/**
275
* @brief Protocol driver not attached
276
*/
277
#define EUNATCH 49
278
279
/**
280
* @brief No CSI structure available
281
*/
282
#define ENOCSI 50
283
284
/**
285
* @brief Level 2 halted
286
*/
287
#define EL2HLT 51
288
289
/**
290
* @brief Invalid exchange
291
*/
292
#define EBADE 52
293
294
/**
295
* @brief Invalid request descriptor
296
*/
297
#define EBADR 53
298
299
/**
300
* @brief Exchange full
301
*/
302
#define EXFULL 54
303
304
/**
305
* @brief No anode
306
*/
307
#define ENOANO 55
308
309
/**
310
* @brief Invalid request code
311
*/
312
#define EBADRQC 56
313
314
/**
315
* @brief Invalid slot
316
*/
317
#define EBADSLT 57
318
319
/**
320
* @brief Bad font file format
321
*/
322
#define EBFONT 59
323
324
/**
325
* @brief Device not a stream
326
*/
327
#define ENOSTR 60
328
329
/**
330
* @brief No data available
331
*/
332
#define ENODATA 61
333
334
/**
335
* @brief Timer expired
336
*/
337
#define ETIME 62
338
339
/**
340
* @brief Out of streams resources
341
*/
342
#define ENOSR 63
343
344
/**
345
* @brief Machine is not on the network
346
*/
347
#define ENONET 64
348
349
/**
350
* @brief Package not installed
351
*/
352
#define ENOPKG 65
353
354
/**
355
* @brief Object is remote
356
*/
357
#define EREMOTE 66
358
359
/**
360
* @brief Link has been severed
361
*/
362
#define ENOLINK 67
363
364
/**
365
* @brief Advertise error
366
*/
367
#define EADV 68
368
369
/**
370
* @brief Srmount error
371
*/
372
#define ESRMNT 69
373
374
/**
375
* @brief Communication error on send
376
*/
377
#define ECOMM 70
378
379
/**
380
* @brief Protocol error
381
*/
382
#define EPROTO 71
383
384
/**
385
* @brief Multihop attempted
386
*/
387
#define EMULTIHOP 72
388
389
/**
390
* @brief RFS specific error
391
*/
392
#define EDOTDOT 73
393
394
/**
395
* @brief Not a data message
396
*/
397
#define EBADMSG 74
398
399
/**
400
* @brief Value too large for defined data type
401
*/
402
#define EOVERFLOW 75
403
404
/**
405
* @brief Name not unique on network
406
*/
407
#define ENOTUNIQ 76
408
409
/**
410
* @brief File descriptor in bad state
411
*/
412
#define EBADFD 77
413
414
/**
415
* @brief Remote address changed
416
*/
417
#define EREMCHG 78
418
419
/**
420
* @brief Can not access a needed shared library
421
*/
422
#define ELIBACC 79
423
424
/**
425
* @brief Accessing a corrupted shared library
426
*/
427
#define ELIBBAD 80
428
429
/**
430
* @brief .lib section in a.out corrupted
431
*/
432
#define ELIBSCN 81
433
434
/**
435
* @brief Attempting to link in too many shared libraries
436
*/
437
#define ELIBMAX 82
438
439
/**
440
* @brief Cannot exec a shared library directly
441
*/
442
#define ELIBEXEC 83
443
444
/**
445
* @brief Illegal byte sequence
446
*/
447
#define EILSEQ 84
448
449
/**
450
* @brief Interrupted system call should be restarted
451
*/
452
#define ERESTART 85
453
454
/**
455
* @brief Streams pipe error
456
*/
457
#define ESTRPIPE 86
458
459
/**
460
* @brief Too many users
461
*/
462
#define EUSERS 87
463
464
/**
465
* @brief Socket operation on non-socket
466
*/
467
#define ENOTSOCK 88
468
469
/**
470
* @brief Destination address required
471
*/
472
#define EDESTADDRREQ 89
473
474
/**
475
* @brief Message too long
476
*/
477
#define EMSGSIZE 90
478
479
/**
480
* @brief Protocol wrong type for socket
481
*/
482
#define EPROTOTYPE 91
483
484
/**
485
* @brief Protocol not available
486
*/
487
#define ENOPROTOOPT 92
488
489
/**
490
* @brief Protocol not supported
491
*/
492
#define EPROTONOSUPPORT 93
493
494
/**
495
* @brief Socket type not supported
496
*/
497
#define ESOCKTNOSUPPORT 94
498
499
/**
500
* @brief Operation not supported on transport endpoint
501
*/
502
#define EOPNOTSUPP 95
503
504
/**
505
* @brief Protocol family not supported
506
*/
507
#define EPFNOSUPPORT 96
508
509
/**
510
* @brief Address family not supported by protocol
511
*/
512
#define EAFNOSUPPORT 97
513
514
/**
515
* @brief Address already in use
516
*/
517
#define EADDRINUSE 98
518
519
/**
520
* @brief Cannot assign requested address
521
*/
522
#define EADDRNOTAVAIL 99
523
524
/**
525
* @brief Network is down
526
*/
527
#define ENETDOWN 100
528
529
/**
530
* @brief Network is unreachable
531
*/
532
#define ENETUNREACH 101
533
534
/**
535
* @brief Network dropped connection because of reset
536
*/
537
#define ENETRESET 102
538
539
/**
540
* @brief Software caused connection abort
541
*/
542
#define ECONNABORTED 103
543
544
/**
545
* @brief Connection reset by peer
546
*/
547
#define ECONNRESET 104
548
549
/**
550
* @brief No buffer space available
551
*/
552
#define ENOBUFS 105
553
554
/**
555
* @brief Transport endpoint is already connected
556
*/
557
#define EISCONN 106
558
559
/**
560
* @brief Transport endpoint is not connected
561
*/
562
#define ENOTCONN 107
563
564
/**
565
* @brief Cannot send after transport endpoint shutdown
566
*/
567
#define ESHUTDOWN 108
568
569
/**
570
* @brief Too many references: cannot splice
571
*/
572
#define ETOOMANYREFS 109
573
574
/**
575
* @brief Connection timed out
576
*/
577
#define ETIMEDOUT 110
578
579
/**
580
* @brief Connection refused
581
*/
582
#define ECONNREFUSED 111
583
584
/**
585
* @brief Host is down
586
*/
587
#define EHOSTDOWN 112
588
589
/**
590
* @brief No route to host
591
*/
592
#define EHOSTUNREACH 113
593
594
/**
595
* @brief Operation already in progress
596
*/
597
#define EALREADY 114
598
599
/**
600
* @brief Operation now in progress
601
*/
602
#define EINPROGRESS 115
603
604
/**
605
* @brief Stale NFS file handle
606
*/
607
#define ESTALE 116
608
609
/**
610
* @brief Structure needs cleaning
611
*/
612
#define EUCLEAN 117
613
614
/**
615
* @brief Not a XENIX named type file
616
*/
617
#define ENOTNAM 118
618
619
/**
620
* @brief No XENIX semaphores available
621
*/
622
#define ENAVAIL 119
623
624
/**
625
* @brief Is a named type file
626
*/
627
#define EISNAM 120
628
629
/**
630
* @brief Remote I/O error
631
*/
632
#define EREMOTEIO 121
633
634
/**
635
* @brief Quota exceeded
636
*/
637
#define EDQUOT 122
638
639
/**
640
* @brief No medium found
641
*/
642
#define ENOMEDIUM 123
643
644
/**
645
* @brief Wrong medium type
646
*/
647
#define EMEDIUMTYPE 124
648
649
/**
650
* @brief Operation Canceled
651
*/
652
#define ECANCELED 125
653
654
/**
655
* @brief Required key not available
656
*/
657
#define ENOKEY 126
658
659
/**
660
* @brief Key has expired
661
*/
662
#define EKEYEXPIRED 127
663
664
/**
665
* @brief Key has been revoked
666
*/
667
#define EKEYREVOKED 128
668
669
/**
670
* @brief Key was rejected by service
671
*/
672
#define EKEYREJECTED 129
673
674
/**
675
* @brief Owner died
676
*/
677
#define EOWNERDEAD 130
678
679
/**
680
* @brief State not recoverable
681
*/
682
#define ENOTRECOVERABLE 131
683
684
/**
685
* @brief Operation not possible due to RF-kill
686
*/
687
#define ERFKILL 132
688
689
/**
690
* @brief Maximum value for posix error codes (not inclusive)
691
*/
692
#define ERR_POSIX_MAX 133
693
694
/**
695
* @brief Invalid or unknown control request
696
*/
697
#define EUNKNOWNCTL 133
698
699
/**
700
* @brief Invalid path format
701
*/
702
#define EBADPATH 134
703
704
/**
705
* @brief Invalid path flag
706
*/
707
#define EBADFLAG 135
708
709
/**
710
* @brief Operation not supported
711
*/
712
#define ENOTSUP 136
713
714
/**
715
* @brief Resource disconnected or freed
716
*/
717
#define EDISCONNECTED 137
718
719
/**
720
* @brief Process spawn failed
721
*/
722
#define ESPAWNFAIL 138
723
724
/**
725
* @brief No such label
726
*/
727
#define ENOLABEL 139
728
729
/**
730
* @brief Maximum value for all error codes (not inclusive)
731
*/
732
#define ERR_MAX 140
733
734
/** @} */
735
736
#if _USE_ANNEX_K == 1
737
#include "
_internal/errno_t.h
"
738
#endif
739
740
#if defined(__cplusplus)
741
}
742
#endif
743
744
#endif
ERR.h
_errno_get
int * _errno_get(void)
Definition
errno.c:11
errno_t.h
config.h
include
libstd
errno.h
Generated on Fri Dec 12 2025 00:22:10 for PatchworkOS by
1.9.8