]> git.proxmox.com Git - mirror_edk2.git/blob - StdLib/Include/sys/errno.h
Fix GCC build errors.
[mirror_edk2.git] / StdLib / Include / sys / errno.h
1 /** @file
2 The header <sys/errno.h> defines several values, all relating to the reporting of
3 error conditions.
4
5 The enum members expand to integral constant expressions
6 with distinct nonzero values, suitable for use in #if preprocessing
7 directives. These default values are specified as an enum in order to ease
8 the maintenance of the values.
9
10 Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
11 This program and the accompanying materials are licensed and made available under
12 the terms and conditions of the BSD License that accompanies this distribution.
13 The full text of the license may be found at
14 http://opensource.org/licenses/bsd-license.
15
16 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
17 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 **/
19 #ifdef _ERRNO_H // May only be included from <errno.h>
20 #ifndef _SYS_ERRNO_H
21 #define _SYS_ERRNO_H
22
23 /* Define the error numbers, sequentially, beginning at 1. */
24 enum {
25 __EMINERRORVAL = 1, /* The lowest valid error value */
26 __EPERM = __EMINERRORVAL, /* 1 Operation not permitted */
27 __ENOENT, /* 2 No such file or directory */
28 __ESRCH, /* 3 No such process */
29 __EINTR, /* 4 Interrupted system call */
30 __EIO, /* 5 Input/output error */
31 __ENXIO, /* 6 Device not configured */
32 __E2BIG, /* 7 Argument list too long */
33 __ENOEXEC, /* 8 Exec format error */
34 __EBADF, /* 9 Bad file descriptor */
35 __ECHILD, /* 10 No child processes */
36 __EDEADLK, /* 11 Resource deadlock avoided */
37 __ENOMEM, /* 12 Cannot allocate memory */
38 __EACCES, /* 13 Permission denied */
39 __EFAULT, /* 14 Bad address */
40 __ENOTBLK, /* 15 Block device required */
41 __EBUSY, /* 16 Device busy */
42 __EEXIST, /* 17 File exists */
43 __EXDEV, /* 18 Cross-device link */
44 __ENODEV, /* 19 Operation not supported by device */
45 __ENOTDIR, /* 20 Not a directory */
46 __EISDIR, /* 21 Is a directory */
47 __EINVAL, /* 22 Invalid argument */
48 __ENFILE, /* 23 Too many open files in system */
49 __EMFILE, /* 24 Too many open file descriptors */
50 __ENOTTY, /* 25 Inappropriate ioctl for device */
51 __ETXTBSY, /* 26 Text file busy */
52 __EFBIG, /* 27 File too large */
53 __ENOSPC, /* 28 No space left on device */
54 __ESPIPE, /* 29 Illegal seek */
55 __EROFS, /* 30 Read-only filesystem */
56 __EMLINK, /* 31 Too many links */
57 __EPIPE, /* 32 Broken pipe */
58
59 /* math software -- these are the only two values required by the C Standard */
60 __EDOM, /* 33 Numerical argument out of domain */
61 __ERANGE, /* 34 Result too large */
62
63 /* non-blocking and interrupt i/o */
64 __EAGAIN, /* 35 Resource temporarily unavailable */
65 __EWOULDBLOCK = __EAGAIN, /* 35 Operation would block */
66 __EINPROGRESS, /* 36 Operation now in progress */
67 __EALREADY, /* 37 Operation already in progress */
68
69 /* ipc/network software -- argument errors */
70 __ENOTSOCK, /* 38 Socket operation on non-socket */
71 __EDESTADDRREQ, /* 39 Destination address required */
72 __EMSGSIZE, /* 40 Message too long */
73 __EPROTOTYPE, /* 41 Protocol wrong type for socket */
74 __ENOPROTOOPT, /* 42 Protocol not available */
75 __EPROTONOSUPPORT, /* 43 Protocol not supported */
76 __ESOCKTNOSUPPORT, /* 44 Socket type not supported */
77 __EOPNOTSUPP, /* 45 Operation not supported */
78 __ENOTSUP = __EOPNOTSUPP, /* 45 Operation not supported */
79 __EPFNOSUPPORT, /* 46 Protocol family not supported */
80 __EAFNOSUPPORT, /* 47 Address family not supported by protocol family */
81 __EADDRINUSE, /* 48 Address already in use */
82 __EADDRNOTAVAIL, /* 49 Can't assign requested address */
83
84 /* ipc/network software -- operational errors */
85 __ENETDOWN, /* 50 Network is down */
86 __ENETUNREACH, /* 51 Network is unreachable */
87 __ENETRESET, /* 52 Network dropped connection on reset */
88 __ECONNABORTED, /* 53 Software caused connection abort */
89 __ECONNRESET, /* 54 Connection reset by peer */
90 __ENOBUFS, /* 55 No buffer space available */
91 __EISCONN, /* 56 Socket is already connected */
92 __ENOTCONN, /* 57 Socket is not connected */
93 __ESHUTDOWN, /* 58 Can't send after socket shutdown */
94 __ETOOMANYREFS, /* 59 Too many references: can't splice */
95 __ETIMEDOUT, /* 60 Operation timed out */
96 __ECONNREFUSED, /* 61 Connection refused */
97 __ELOOP, /* 62 Too many levels of symbolic links */
98 __ENAMETOOLONG, /* 63 File name too long */
99 __EHOSTDOWN, /* 64 Host is down */
100 __EHOSTUNREACH, /* 65 No route to host */
101
102 __ENOTEMPTY, /* 66 Directory not empty */
103
104 /* quotas, etc. */
105 __EPROCLIM, /* 67 Too many processes */
106 __EUSERS, /* 68 Too many users */
107 __EDQUOT, /* 69 Disc quota exceeded */
108
109 /* Network File System */
110 __ESTALE, /* 70 Stale NFS file handle */
111 __EREMOTE, /* 71 Too many levels of remote in path */
112 __EBADRPC, /* 72 RPC struct is bad */
113 __ERPCMISMATCH, /* 73 RPC version wrong */
114 __EPROGUNAVAIL, /* 74 RPC prog. not avail */
115 __EPROGMISMATCH, /* 75 Program version wrong */
116 __EPROCUNAVAIL, /* 76 Bad procedure for program */
117 __ENOLCK, /* 77 No locks available */
118 __ENOSYS, /* 78 Function not implemented */
119 __EFTYPE, /* 79 Inappropriate file type or format */
120 __EAUTH, /* 80 Authentication error */
121 __ENEEDAUTH, /* 81 Need authenticator */
122 __EIDRM, /* 82 Identifier removed */
123 __ENOMSG, /* 83 No message of desired type */
124 __EOVERFLOW, /* 84 Value too large to be stored in data type */
125 __EILSEQ, /* 85 Illegal byte sequence */
126 __ENOTHING_1, /* 86 Place Holder */
127 __ECANCELED, /* 87 Operation canceled */
128
129 __EBADMSG, /* 88 Bad message */
130 __ENODATA, /* 89 No message available */
131 __ENOSR, /* 90 No STREAM resources */
132 __ENOSTR, /* 91 Not a STREAM */
133 __ETIME, /* 92 STREAM ioctl timeout */
134
135 __ENOATTR, /* 93 Attribute not found */
136
137 __EDOOFUS, /* 94 Programming error */
138
139 __EMULTIHOP, /* 95 Multihop attempted */
140 __ENOLINK, /* 96 Link has been severed */
141 __EPROTO, /* 97 Protocol error */
142
143 __EBUFSIZE, /* 98 Buffer too small to hold result */
144
145 __EMAXERRORVAL /* One more than the highest defined error value. */
146 };
147
148 #endif /* _SYS_ERRNO_H */
149 #else /* not defined _ERRNO_H */
150 #error <sys/errno.h> must only be included by <errno.h>.
151 #endif /* _ERRNO_H */