-
Notifications
You must be signed in to change notification settings - Fork 126
/
PosixStatus.cs
1369 lines (1106 loc) · 36.4 KB
/
PosixStatus.cs
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
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//
// PosixStatus.cs
//
// Copyright (c) 2016 Couchbase, Inc All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
using System.Reflection;
using System.Runtime.InteropServices;
using Couchbase.Lite.Internal.Logging;
using Couchbase.Lite.Util;
using NotNull = JetBrains.Annotations.NotNullAttribute;
namespace Couchbase.Lite
{
/// <summary>
/// The base codes that are guaranteed to be the same on any POSIX system
/// </summary>
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public abstract class PosixBase
{
#region Constants
private const string Tag = nameof(PosixBase);
#endregion
/// <summary>
/// Operation not permitted
/// </summary>
public static readonly int EPERM = 1;
/// <summary>
/// No such file or directory
/// </summary>
public static readonly int ENOENT = 2;
/// <summary>
/// No such process
/// </summary>
public static readonly int ESRCH = 3;
/// <summary>
/// Interrupted system call
/// </summary>
public static readonly int EINTR = 4;
/// <summary>
/// Input/output error
/// </summary>
public static readonly int EIO = 5;
/// <summary>
/// Device not configured
/// </summary>
public static readonly int ENXIO = 6;
/// <summary>
/// Argument list too long
/// </summary>
public static readonly int E2BIG = 7;
/// <summary>
/// Exec format error
/// </summary>
public static readonly int ENOEXEC = 8;
/// <summary>
/// Bad file descriptor
/// </summary>
public static readonly int EBADF = 9;
/// <summary>
/// No child processes
/// </summary>
public static readonly int ECHILD = 10;
/// <summary>
/// Cannot allocate memory
/// </summary>
public static readonly int ENOMEM = 12;
/// <summary>
/// Permission denied
/// </summary>
public static readonly int EACCES = 13;
/// <summary>
/// Bad address
/// </summary>
public static readonly int EFAULT = 14;
/// <summary>
/// Device / Resource busy
/// </summary>
public static readonly int EBUSY = 16;
/// <summary>
/// File exists
/// </summary>
public static readonly int EEXIST = 17;
/// <summary>
/// Cross-device link
/// </summary>
public static readonly int EXDEV = 18;
/// <summary>
/// Operation not supported by device
/// </summary>
public static readonly int ENODEV = 19;
/// <summary>
/// Not a directory
/// </summary>
public static readonly int ENOTDIR = 20;
/// <summary>
/// Is a directory
/// </summary>
public static readonly int EISDIR = 21;
/// <summary>
/// Invalid argument
/// </summary>
public static readonly int EINVAL = 22;
/// <summary>
/// Too many open files in system
/// </summary>
public static readonly int ENFILE = 23;
/// <summary>
/// Too many open files
/// </summary>
public static readonly int EMFILE = 24;
/// <summary>
/// Inappropriate ioctl for device
/// </summary>
public static readonly int ENOTTY = 25;
/// <summary>
/// File too large
/// </summary>
public static readonly int EFBIG = 27;
/// <summary>
/// No space left on device
/// </summary>
public static readonly int ENOSPC = 28;
/// <summary>
/// Illegal seek
/// </summary>
public static readonly int ESPIPE = 29;
/// <summary>
/// Read-only file system
/// </summary>
public static readonly int EROFS = 30;
/// <summary>
/// Too many links
/// </summary>
public static readonly int EMLINK = 31;
/// <summary>
/// Broken pipe
/// </summary>
public static readonly int EPIPE = 32;
/* math software */
/// <summary>
/// Numerical argument out of domain
/// </summary>
public static readonly int EDOM = 33;
/// <summary>
/// Result too large
/// </summary>
public static readonly int ERANGE = 34;
/// <summary>
/// Gets the correct value for a given code (based on the name of the error e.g. ECONNREFUSED)
/// for the currently executing OS
/// </summary>
/// <param name="name">The name of the code to get the value for (e.g. ECONNREFUSED)</param>
/// <returns>The correct code for the given error, or 0 if the name does not exist</returns>
public static int GetCode([NotNull]string name)
{
CBDebug.MustNotBeNull(WriteLog.To.Database, Tag, nameof(name), name);
Type classType;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) {
classType = typeof(PosixWindows);
} else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) {
classType = typeof(PosixMac);
} else {
classType = typeof(PosixLinux);
}
var field = classType.GetField(name.ToUpperInvariant(), BindingFlags.Static | BindingFlags.Public | BindingFlags.FlattenHierarchy);
return (int?)field?.GetValue(null) ?? 0;
}
/// <summary>
/// Checks whether or not the given code is the same as the code for the POSIX
/// error name in a cross platform way.
/// </summary>
/// <param name="name">The name of the code to get the value for (e.g. ECONNREFUSED)</param>
/// <param name="code">The code to check</param>
/// <returns><c>true</c> if the code matches, otherwise <c>false</c></returns>
public static bool IsError([NotNull]string name, int code)
{
var codeForName = GetCode(name);
return code == codeForName;
}
}
/// <summary>
/// POSIX codes that are specific to Windows
/// </summary>
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public sealed class PosixWindows : PosixBase
{
/// <summary>
/// Resource temporarily unavailable
/// </summary>
public static readonly int EAGAIN = 11;
/// <summary>
/// Resource deadlock avoided
/// </summary>
public static readonly int EDEADLK = 36;
/// <summary>
/// File name too long
/// </summary>
public static readonly int ENAMETOOLONG = 38;
/// <summary>
/// No locks available
/// </summary>
public static readonly int ENOLCK = 39;
/// <summary>
/// Function not implemented
/// </summary>
public static readonly int ENOSYS = 40;
/// <summary>
/// Directory not empty
/// </summary>
public static readonly int ENOTEMPTY = 41;
/// <summary>
/// Illegal byte sequence
/// </summary>
public static readonly int EILSEQ = 42;
/// <summary>
/// Address already in use
/// </summary>
public static readonly int EADDRINUSE = 100;
/// <summary>
/// Can't assign requested address
/// </summary>
public static readonly int EADDRNOTAVAIL = 101;
/// <summary>
/// Address family not supported by protocol family
/// </summary>
public static readonly int EAFNOSUPPORT = 102;
/// <summary>
/// Operation already in progress
/// </summary>
public static readonly int EALREADY = 103;
/// <summary>
/// Bad message
/// </summary>
public static readonly int EBADMSG = 104;
/// <summary>
/// Operation canceled
/// </summary>
public static readonly int ECANCELED = 105;
/// <summary>
/// Software caused connection abort
/// </summary>
public static readonly int ECONNABORTED = 106;
/// <summary>
/// Connection refused
/// </summary>
public static readonly int ECONNREFUSED = 107;
/// <summary>
/// Connection reset by peer
/// </summary>
public static readonly int ECONNRESET = 108;
/// <summary>
/// Destination address required
/// </summary>
public static readonly int EDESTADDRREQ = 109;
/// <summary>
/// No route to host
/// </summary>
public static readonly int EHOSTUNREACH = 110;
/// <summary>
/// Identifier removed
/// </summary>
public static readonly int EIDRM = 111;
/// <summary>
/// Operation now in progress
/// </summary>
public static readonly int EINPROGRESS = 112;
/// <summary>
/// Socket is already connected
/// </summary>
public static readonly int EISCONN = 113;
/// <summary>
/// Too many levels of symbolic links
/// </summary>
public static readonly int ELOOP = 114;
/// <summary>
/// Message too long
/// </summary>
public static readonly int EMSGSIZE = 115;
/// <summary>
/// Network is down
/// </summary>
public static readonly int ENETDOWN = 116;
/// <summary>
/// Network dropped connection on reset
/// </summary>
public static readonly int ENETRESET = 117;
/// <summary>
/// Network is unreachable
/// </summary>
public static readonly int ENETUNREACH = 118;
/// <summary>
/// No buffer space available
/// </summary>
public static readonly int ENOBUFS = 119;
/// <summary>
/// No message available on STREAM
/// </summary>
public static readonly int ENODATA = 120;
/// <summary>
/// Link has been severed
/// </summary>
public static readonly int ENOLINK = 121;
/// <summary>
/// No message of desired type
/// </summary>
public static readonly int ENOMSG = 122;
/// <summary>
/// Protocol not available
/// </summary>
public static readonly int ENOPROTOOPT = 123;
/// <summary>
/// No STREAM resources
/// </summary>
public static readonly int ENOSR = 124;
/// <summary>
/// Not a STREAM
/// </summary>
public static readonly int ENOSTR = 125;
/// <summary>
/// Socket is not connected
/// </summary>
public static readonly int ENOTCONN = 126;
/// <summary>
/// State not recoverable
/// </summary>
public static readonly int ENOTRECOVERABLE = 127;
/// <summary>
/// Socket operation on non-socket
/// </summary>
public static readonly int ENOTSOCK = 128;
/// <summary>
/// Operation not supported
/// </summary>
public static readonly int ENOTSUP = 129;
/// <summary>
/// Operation not supported on socket
/// </summary>
public static readonly int EOPNOTSUPP = 130;
/// <summary>
/// Undefined error
/// </summary>
public static readonly int EOTHER = 131;
/// <summary>
/// Value too large to be stored in data type
/// </summary>
public static readonly int EOVERFLOW = 132;
/// <summary>
/// Previous owner died
/// </summary>
public static readonly int EOWNERDEAD = 133;
/// <summary>
/// Protocol error
/// </summary>
public static readonly int EPROTO = 134;
/// <summary>
/// Protocol not supported
/// </summary>
public static readonly int EPROTONOSUPPORT = 135;
/// <summary>
/// Protocol wrong type for socket
/// </summary>
public static readonly int EPROTOTYPE = 136;
/// <summary>
/// STREAM ioctl timeout
/// </summary>
public static readonly int ETIME = 137;
/// <summary>
/// Operation timed out
/// </summary>
public static readonly int ETIMEDOUT = 138;
/// <summary>
/// Text file busy
/// </summary>
public static readonly int ETXTBSY = 139;
/// <summary>
/// Operation would block
/// </summary>
public static readonly int EWOULDBLOCK = 140;
}
/// <summary>
/// A class containing POSIX codes that are unique to macOS
/// </summary>
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public sealed class PosixMac : PosixBase
{
/// <summary>
/// Resource deadlock avoided
/// </summary>
public static readonly int EDEADLK = 11;
/// <summary>
/// Block device required
/// </summary>
public static readonly int ENOTBLK = 15;
/// <summary>
/// Text file busy
/// </summary>
public static readonly int ETXTBSY = 26;
/// <summary>
/// Resource temporarily unavailable
/// </summary>
public static readonly int EAGAIN = 35;
/// <summary>
/// Operation would block
/// </summary>
public static readonly int EWOULDBLOCK = EAGAIN;
/// <summary>
/// Operation now in progress
/// </summary>
public static readonly int EINPROGRESS = 36;
/// <summary>
/// Operation already in progress
/// </summary>
public static readonly int EALREADY = 37;
/// <summary>
/// Socket operation on non-socket
/// </summary>
public static readonly int ENOTSOCK = 38;
/// <summary>
/// Destination address required
/// </summary>
public static readonly int EDESTADDRREQ = 39;
/// <summary>
/// Message too long
/// </summary>
public static readonly int EMSGSIZE = 40;
/// <summary>
/// Protocol wrong type for socket
/// </summary>
public static readonly int EPROTOTYPE = 41;
/// <summary>
/// Protocol not available
/// </summary>
public static readonly int ENOPROTOOPT = 42;
/// <summary>
/// Protocol not supported
/// </summary>
public static readonly int EPROTONOSUPPORT = 43;
/// <summary>
/// Socket type not supported
/// </summary>
public static readonly int ESOCKTNOSUPPORT = 44;
/// <summary>
/// Operation not supported
/// </summary>
public static readonly int ENOTSUP = 45;
/// <summary>
/// Operation not supported on socket
/// </summary>
public static readonly int EOPNOTSUPP = ENOTSUP;
/// <summary>
/// Protocol family not supported
/// </summary>
public static readonly int EPFNOSUPPORT = 46;
/// <summary>
/// Address family not supported by protocol family
/// </summary>
public static readonly int EAFNOSUPPORT = 47;
/// <summary>
/// Address already in use
/// </summary>
public static readonly int EADDRINUSE = 48;
/// <summary>
/// Can't assign requested address
/// </summary>
public static readonly int EADDRNOTAVAIL = 49;
/// <summary>
/// Network is down
/// </summary>
public static readonly int ENETDOWN = 50;
/// <summary>
/// Network is unreachable
/// </summary>
public static readonly int ENETUNREACH = 51;
/// <summary>
/// Network dropped connection on reset
/// </summary>
public static readonly int ENETRESET = 52;
/// <summary>
/// Software caused connection abort
/// </summary>
public static readonly int ECONNABORTED = 53;
/// <summary>
/// Connection reset by peer
/// </summary>
public static readonly int ECONNRESET = 54;
/// <summary>
/// No buffer space available
/// </summary>
public static readonly int ENOBUFS = 55;
/// <summary>
/// Socket is already connected
/// </summary>
public static readonly int EISCONN = 56;
/// <summary>
/// Socket is not connected
/// </summary>
public static readonly int ENOTCONN = 57;
/// <summary>
/// Can't send after socket shutdown
/// </summary>
public static readonly int ESHUTDOWN = 58;
/// <summary>
/// Too many references: can't splice
/// </summary>
public static readonly int ETOOMANYREFS = 59;
/// <summary>
/// Operation timed out
/// </summary>
public static readonly int ETIMEDOUT = 60;
/// <summary>
/// Connection refused
/// </summary>
public static readonly int ECONNREFUSED = 61;
/// <summary>
/// Too many levels of symbolic links
/// </summary>
public static readonly int ELOOP = 62;
/// <summary>
/// File name too long
/// </summary>
public static readonly int ENAMETOOLONG = 63;
/// <summary>
/// Host is down
/// </summary>
public static readonly int EHOSTDOWN = 64;
/// <summary>
/// No route to host
/// </summary>
public static readonly int EHOSTUNREACH = 65;
/// <summary>
/// Directory not empty
/// </summary>
public static readonly int ENOTEMPTY = 66;
/// <summary>
/// Too many processes
/// </summary>
public static readonly int EPROCLIM = 67;
/// <summary>
/// Too many users
/// </summary>
public static readonly int EUSERS = 68;
/// <summary>
/// Disc quota exceeded
/// </summary>
public static readonly int EDQUOT = 69;
/// <summary>
/// Stale NFS file handle
/// </summary>
public static readonly int ESTALE = 70;
/// <summary>
/// Too many levels of remote in path
/// </summary>
public static readonly int EREMOTE = 71;
/// <summary>
/// RPC struct is bad
/// </summary>
public static readonly int EBADRPC = 72;
/// <summary>
/// RPC version wrong
/// </summary>
public static readonly int ERPCMISMATCH = 73;
/// <summary>
/// RPC prog. not avail
/// </summary>
public static readonly int EPROGUNAVAIL = 74;
/// <summary>
/// Program version wrong
/// </summary>
public static readonly int EPROGMISMATCH = 75;
/// <summary>
/// Bad procedure for program
/// </summary>
public static readonly int EPROCUNAVAIL = 76;
/// <summary>
/// No locks available
/// </summary>
public static readonly int ENOLCK = 77;
/// <summary>
/// Function not implemented
/// </summary>
public static readonly int ENOSYS = 78;
/// <summary>
/// Inappropriate file type or format
/// </summary>
public static readonly int EFTYPE = 79;
/// <summary>
/// Authentication error
/// </summary>
public static readonly int EAUTH = 80;
/// <summary>
/// Need authenticator
/// </summary>
public static readonly int ENEEDAUTH = 81;
/// <summary>
/// Device power is off
/// </summary>
public static readonly int EPWROFF = 82;
/// <summary>
/// Device error, e.g. paper out
/// </summary>
public static readonly int EDEVERR = 83;
/// <summary>
/// Value too large to be stored in data type
/// </summary>
public static readonly int EOVERFLOW = 84;
/// <summary>
/// Bad executable
/// </summary>
public static readonly int EBADEXEC = 85;
/// <summary>
/// Bad CPU type in executable
/// </summary>
public static readonly int EBADARCH = 86;
/// <summary>
/// Shared library version mismatch
/// </summary>
public static readonly int ESHLIBVERS = 87;
/// <summary>
/// Malformed Macho file
/// </summary>
public static readonly int EBADMACHO = 88;
/// <summary>
/// Operation canceled
/// </summary>
public static readonly int ECANCELED = 89;
/// <summary>
/// Identifier removed
/// </summary>
public static readonly int EIDRM = 90;
/// <summary>
/// No message of desired type
/// </summary>
public static readonly int ENOMSG = 91;
/// <summary>
/// Illegal byte sequence
/// </summary>
public static readonly int EILSEQ = 92;
/// <summary>
/// Attribute not found
/// </summary>
public static readonly int ENOATTR = 93;
/// <summary>
/// Bad message
/// </summary>
public static readonly int EBADMSG = 94;
/// <summary>
/// Multihop attempted
/// </summary>
public static readonly int EMULTIHOP = 95;
/// <summary>
/// No message available on STREAM
/// </summary>
public static readonly int ENODATA = 96;
/// <summary>
/// Reserved
/// </summary>
public static readonly int ENOLINK = 97;
/// <summary>
/// No STREAM resources
/// </summary>
public static readonly int ENOSR = 98;
/// <summary>
/// Not a STREAM
/// </summary>
public static readonly int ENOSTR = 99;
/// <summary>
/// Protocol error
/// </summary>
public static readonly int EPROTO = 100;
/// <summary>
/// STREAM ioctl timeout
/// </summary>
public static readonly int ETIME = 101;
/// <summary>
/// No such policy registered
/// </summary>
public static readonly int ENOPOLICY = 103;
/// <summary>
/// State not recoverable
/// </summary>
public static readonly int ENOTRECOVERABLE = 104;
/// <summary>
/// Previous owner died
/// </summary>
public static readonly int EOWNERDEAD = 105;
/// <summary>
/// Interface output queue is full
/// </summary>
public static readonly int EQFULL = 106;
}
/// <summary>
/// A class containing POSIX codes that are unique to the Linux kernel
/// </summary>
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public sealed class PosixLinux : PosixBase
{
/// <summary>
/// Resource temporarily unavailable
/// </summary>
public static readonly int EAGAIN = 11;
/// <summary>
/// Operation would block
/// </summary>
public static readonly int EWOULDBLOCK = EAGAIN;
/// <summary>
/// Block device required
/// </summary>
public static readonly int ENOTBLK = 15;
/// <summary>
/// Text file busy
/// </summary>
public static readonly int ETXTBSY = 26;
/// <summary>
/// Resource deadlock would occur
/// </summary>
public static readonly int EDEADLK = 35;
/// <summary>
/// File name too long
/// </summary>
public static readonly int ENAMETOOLONG = 36;
/// <summary>
/// No record locks available
/// </summary>
public static readonly int ENOLCK = 37;
/// <summary>
/// Function not implemented
/// </summary>
public static readonly int ENOSYS = 38;
/// <summary>
/// Directory not empty
/// </summary>
public static readonly int ENOTEMPTY = 39;
/// <summary>
/// Too many symbolic links encountered
/// </summary>
public static readonly int ELOOP = 40;
/// <summary>
/// No message of desired type
/// </summary>
public static readonly int ENOMSG = 42;
/// <summary>
/// Identifier removed
/// </summary>
public static readonly int EIDRM = 43;
/// <summary>
/// Channel number out of range
/// </summary>
public static readonly int ECHRNG = 44;
/// <summary>
/// Level 2 not synchronized
/// </summary>
public static readonly int EL2NSYNC = 45;
/// <summary>
/// Level 3 halted
/// </summary>
public static readonly int EL3HLT = 46;
/// <summary>
/// Level 3 reset
/// </summary>
public static readonly int EL3RST = 47;
/// <summary>
/// Link number out of range
/// </summary>
public static readonly int ELNRNG = 48;
/// <summary>
/// Protocol driver not attached
/// </summary>
public static readonly int EUNATCH = 49;
/// <summary>
/// No CSI structure available
/// </summary>
public static readonly int ENOCSI = 50;
/// <summary>
/// Level 2 halted
/// </summary>
public static readonly int EL2HLT = 51;
/// <summary>
/// Invalid exchange
/// </summary>
public static readonly int EBADE = 52;
/// <summary>
/// Invalid request descriptor
/// </summary>
public static readonly int EBADR = 53;
/// <summary>
/// Exchange full
/// </summary>
public static readonly int EXFULL = 54;
/// <summary>
/// No anode
/// </summary>
public static readonly int ENOANO = 55;
/// <summary>
/// Invalid request code
/// </summary>
public static readonly int EBADRQC = 56;
/// <summary>
/// Invalid slot