]>
Commit | Line | Data |
---|---|---|
2aa62f2b | 1 | /** @file\r |
681cc25c | 2 | The header <errno.h> defines several macros, all relating to the reporting of\r |
2aa62f2b | 3 | error conditions.\r |
4 | \r | |
681cc25c | 5 | The macros expand to integral constant expressions\r |
2aa62f2b | 6 | with distinct nonzero values, suitable for use in #if preprocessing\r |
681cc25c | 7 | directives.\r |
8 | \r | |
9 | The ISO/IEC 9899 specification requires that these be macros.\r | |
10 | \r | |
11 | The macros expand to integral constant expressions\r | |
12 | with distinct nonzero values, suitable for use in #if preprocessing\r | |
13 | directives; the variable errno which expands to a modifiable lvalue that has type int,\r | |
2aa62f2b | 14 | the value of which is set to a positive error number by several library\r |
681cc25c | 15 | functions; and the variable EFIerrno which is an extension allowing the return status\r |
16 | of the underlying UEFI functions to be returned.\r | |
2aa62f2b | 17 | \r |
681cc25c | 18 | The value of errno and EFIerrno is zero at program startup. On program startup, errno\r |
19 | is initialized to zero but is never set to zero by\r | |
2aa62f2b | 20 | any library function. The value of errno may be set to a non-zero value by\r |
21 | a library function call whether or not there is an error, provided the use\r | |
681cc25c | 22 | of errno is not documented in the description of the function in\r |
23 | the governing standard: ISO/IEC 9899:1990 with Amendment 1 or ISO/IEC 9899:199409.\r | |
24 | \r | |
25 | EFIerrno, like errno, should only be checked if it is known that the preceeding function call\r | |
26 | called a UEFI function. Functions in which UEFI functions are called dependent upon context\r | |
27 | or parameter values should guarantee that EFIerrno is set to zero by default, or to the status\r | |
28 | value returned by any UEFI functions which are called.\r | |
2aa62f2b | 29 | \r |
681cc25c | 30 | All macro definitions in this list must begin with the letter 'E'\r |
31 | and be followed by a digit or an uppercase letter.\r | |
2aa62f2b | 32 | \r |
681cc25c | 33 | Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r |
34 | This program and the accompanying materials are licensed and made available under\r | |
35 | the terms and conditions of the BSD License that accompanies this distribution.\r | |
36 | The full text of the license may be found at\r | |
37 | http://opensource.org/licenses/bsd-license.\r | |
2aa62f2b | 38 | \r |
681cc25c | 39 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r |
40 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
2aa62f2b | 41 | **/\r |
42 | #ifndef _ERRNO_H\r | |
43 | #define _ERRNO_H\r | |
44 | #include <sys/EfiCdefs.h>\r | |
45 | #include <sys/errno.h>\r | |
46 | \r | |
47 | extern int errno;\r | |
48 | extern RETURN_STATUS EFIerrno;\r | |
49 | \r | |
50 | // Define error number in terms of the ENUM in <sys/errno.h>\r | |
51 | \r | |
d7ce7006 | 52 | #define ERESTART -1 /* restart syscall */\r |
53 | \r | |
2aa62f2b | 54 | #define EMINERRORVAL __EMINERRORVAL /* The lowest valid error value */\r |
55 | \r | |
681cc25c | 56 | #define EPERM __EPERM /* Operation not permitted */\r |
57 | #define ENOENT __ENOENT /* No such file or directory */\r | |
58 | #define ESRCH __ESRCH /* No such process */\r | |
59 | #define EINTR __EINTR /* Interrupted system call */\r | |
60 | #define EIO __EIO /* Input/output error */\r | |
61 | #define ENXIO __ENXIO /* Device not configured */\r | |
62 | #define E2BIG __E2BIG /* Argument list too long */\r | |
63 | #define ENOEXEC __ENOEXEC /* Exec format error */\r | |
64 | #define EBADF __EBADF /* Bad file descriptor */\r | |
65 | #define ECHILD __ECHILD /* No child processes */\r | |
66 | #define EDEADLK __EDEADLK /* Resource deadlock avoided */\r | |
67 | #define ENOMEM __ENOMEM /* Cannot allocate memory */\r | |
68 | #define EACCES __EACCES /* Permission denied */\r | |
69 | #define EFAULT __EFAULT /* Bad address */\r | |
70 | #define ENOTBLK __ENOTBLK /* Block device required */\r | |
71 | #define EBUSY __EBUSY /* Device busy */\r | |
72 | #define EEXIST __EEXIST /* File exists */\r | |
73 | #define EXDEV __EXDEV /* Cross-device link */\r | |
74 | #define ENODEV __ENODEV /* Operation not supported by device */\r | |
75 | #define ENOTDIR __ENOTDIR /* Not a directory */\r | |
76 | #define EISDIR __EISDIR /* Is a directory */\r | |
77 | #define EINVAL __EINVAL /* Invalid argument */\r | |
78 | #define ENFILE __ENFILE /* Too many open files in system */\r | |
79 | #define EMFILE __EMFILE /* Too many open file descriptors */\r | |
80 | #define ENOTTY __ENOTTY /* Inappropriate ioctl for device */\r | |
81 | #define ETXTBSY __ETXTBSY /* Text file busy */\r | |
82 | #define EFBIG __EFBIG /* File too large */\r | |
83 | #define ENOSPC __ENOSPC /* No space left on device */\r | |
84 | #define ESPIPE __ESPIPE /* Illegal seek */\r | |
85 | #define EROFS __EROFS /* Read-only filesystem */\r | |
86 | #define EMLINK __EMLINK /* Too many links */\r | |
87 | #define EPIPE __EPIPE /* Broken pipe */\r | |
2aa62f2b | 88 | \r |
89 | /* math software -- these are the only two values required by the C Standard */\r | |
681cc25c | 90 | #define EDOM __EDOM /* 3umerical argument out of domain */\r |
91 | #define ERANGE __ERANGE /* 3esult too large */\r | |
2aa62f2b | 92 | \r |
93 | /* non-blocking and interrupt i/o */\r | |
94 | #define EAGAIN __EAGAIN /* 35 Resource temporarily unavailable */\r | |
95 | #define EWOULDBLOCK __EWOULDBLOCK /* 35 Operation would block */\r | |
96 | #define EINPROGRESS __EINPROGRESS /* 36 Operation now in progress */\r | |
97 | #define EALREADY __EALREADY /* 37 Operation already in progress */\r | |
98 | \r | |
99 | /* ipc/network software -- argument errors */\r | |
100 | #define ENOTSOCK __ENOTSOCK /* 38 Socket operation on non-socket */\r | |
101 | #define EDESTADDRREQ __EDESTADDRREQ /* 39 Destination address required */\r | |
102 | #define EMSGSIZE __EMSGSIZE /* 40 Message too long */\r | |
103 | #define EPROTOTYPE __EPROTOTYPE /* 41 Protocol wrong type for socket */\r | |
104 | #define ENOPROTOOPT __ENOPROTOOPT /* 42 Protocol not available */\r | |
105 | #define EPROTONOSUPPORT __EPROTONOSUPPORT /* 43 Protocol not supported */\r | |
106 | #define ESOCKTNOSUPPORT __ESOCKTNOSUPPORT /* 44 Socket type not supported */\r | |
107 | #define EOPNOTSUPP __EOPNOTSUPP /* 45 Operation not supported */\r | |
108 | #define ENOTSUP __ENOTSUP /* 45 Operation not supported */\r | |
109 | #define EPFNOSUPPORT __EPFNOSUPPORT /* 46 Protocol family not supported */\r | |
110 | #define EAFNOSUPPORT __EAFNOSUPPORT /* 47 Address family not supported by protocol family */\r | |
111 | #define EADDRINUSE __EADDRINUSE /* 48 Address already in use */\r | |
112 | #define EADDRNOTAVAIL __EADDRNOTAVAIL /* 49 Can't assign requested address */\r | |
113 | \r | |
114 | /* ipc/network software -- operational errors */\r | |
115 | #define ENETDOWN __ENETDOWN /* 50 Network is down */\r | |
116 | #define ENETUNREACH __ENETUNREACH /* 51 Network is unreachable */\r | |
117 | #define ENETRESET __ENETRESET /* 52 Network dropped connection on reset */\r | |
118 | #define ECONNABORTED __ECONNABORTED /* 53 Software caused connection abort */\r | |
119 | #define ECONNRESET __ECONNRESET /* 54 Connection reset by peer */\r | |
120 | #define ENOBUFS __ENOBUFS /* 55 No buffer space available */\r | |
121 | #define EISCONN __EISCONN /* 56 Socket is already connected */\r | |
122 | #define ENOTCONN __ENOTCONN /* 57 Socket is not connected */\r | |
123 | #define ESHUTDOWN __ESHUTDOWN /* 58 Can't send after socket shutdown */\r | |
124 | #define ETOOMANYREFS __ETOOMANYREFS /* 59 Too many references: can't splice */\r | |
125 | #define ETIMEDOUT __ETIMEDOUT /* 60 Operation timed out */\r | |
126 | #define ECONNREFUSED __ECONNREFUSED /* 61 Connection refused */\r | |
127 | #define ELOOP __ELOOP /* 62 Too many levels of symbolic links */\r | |
128 | #define ENAMETOOLONG __ENAMETOOLONG /* 63 File name too long */\r | |
129 | #define EHOSTDOWN __EHOSTDOWN /* 64 Host is down */\r | |
130 | #define EHOSTUNREACH __EHOSTUNREACH /* 65 No route to host */\r | |
131 | \r | |
132 | #define ENOTEMPTY __ENOTEMPTY /* 66 Directory not empty */\r | |
133 | \r | |
134 | /* quotas, etc. */\r | |
135 | #define EPROCLIM __EPROCLIM /* 67 Too many processes */\r | |
136 | #define EUSERS __EUSERS /* 68 Too many users */\r | |
137 | #define EDQUOT __EDQUOT /* 69 Disc quota exceeded */\r | |
138 | \r | |
139 | /* Network File System */\r | |
140 | #define ESTALE __ESTALE /* 70 Stale NFS file handle */\r | |
141 | #define EREMOTE __EREMOTE /* 71 Too many levels of remote in path */\r | |
142 | #define EBADRPC __EBADRPC /* 72 RPC struct is bad */\r | |
143 | #define ERPCMISMATCH __ERPCMISMATCH /* 73 RPC version wrong */\r | |
144 | #define EPROGUNAVAIL __EPROGUNAVAIL /* 74 RPC prog. not avail */\r | |
145 | #define EPROGMISMATCH __EPROGMISMATCH /* 75 Program version wrong */\r | |
146 | #define EPROCUNAVAIL __EPROCUNAVAIL /* 76 Bad procedure for program */\r | |
147 | #define ENOLCK __ENOLCK /* 77 No locks available */\r | |
148 | #define ENOSYS __ENOSYS /* 78 Function not implemented */\r | |
149 | #define EFTYPE __EFTYPE /* 79 Inappropriate file type or format */\r | |
150 | #define EAUTH __EAUTH /* 80 Authentication error */\r | |
151 | #define ENEEDAUTH __ENEEDAUTH /* 81 Need authenticator */\r | |
152 | #define EIDRM __EIDRM /* 82 Identifier removed */\r | |
153 | #define ENOMSG __ENOMSG /* 83 No message of desired type */\r | |
154 | #define EOVERFLOW __EOVERFLOW /* 84 Value too large to be stored in data type */\r | |
155 | #define EILSEQ __EILSEQ /* 85 Illegal byte sequence */\r | |
156 | #define ENOTHING_1 __ENOTHING_1 /* 86 Place Holder */\r | |
157 | #define ECANCELED __ECANCELED /* 87 Operation canceled */\r | |
158 | \r | |
159 | #define EBADMSG __EBADMSG /* 88 Bad message */\r | |
160 | #define ENODATA __ENODATA /* 89 No message available */\r | |
161 | #define ENOSR __ENOSR /* 90 No STREAM resources */\r | |
162 | #define ENOSTR __ENOSTR /* 91 Not a STREAM */\r | |
163 | #define ETIME __ETIME /* 92 STREAM ioctl timeout */\r | |
164 | \r | |
165 | #define ENOATTR __ENOATTR /* 93 Attribute not found */\r | |
166 | \r | |
167 | #define EDOOFUS __EDOOFUS /* 94 Programming error */\r | |
168 | \r | |
169 | #define EMULTIHOP __EMULTIHOP /* 95 Multihop attempted */\r | |
170 | #define ENOLINK __ENOLINK /* 96 Link has been severed */\r | |
171 | #define EPROTO __EPROTO /* 97 Protocol error */\r | |
172 | \r | |
173 | #define EBUFSIZE __EBUFSIZE /* 98 Buffer too small to hold result */\r | |
174 | \r | |
175 | #define EMAXERRORVAL __EMAXERRORVAL /* One more than the highest defined error value. */\r | |
176 | \r | |
177 | #endif /* _ERRNO_H */\r |