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