UbixOS V2 2.0

errno.h
Go to the documentation of this file.
1 /*-
2 * Copyright (c) 2002-2018 The UbixOS Project.
3 * All rights reserved.
4 *
5 * This was developed by Christopher W. Olsen for the UbixOS Project.
6 *
7 * Redistribution and use in source and binary forms, with or without modification, are permitted
8 * provided that the following conditions are met:
9 *
10 * 1) Redistributions of source code must retain the above copyright notice, this list of
11 * conditions, the following disclaimer and the list of authors.
12 * 2) Redistributions in binary form must reproduce the above copyright notice, this list of
13 * conditions, the following disclaimer and the list of authors in the documentation and/or
14 * other materials provided with the distribution.
15 * 3) Neither the name of the UbixOS Project nor the names of its contributors may be used to
16 * endorse or promote products derived from this software without specific prior written
17 * permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
20 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
22 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29 #ifndef _SYS_ERRNO_H_
30 #define _SYS_ERRNO_H_
31
32 #define EPERM 1 /* Operation not permitted */
33 #define ENOENT 2 /* No such file or directory */
34 #define ESRCH 3 /* No such process */
35 #define EINTR 4 /* Interrupted system call */
36 #define EIO 5 /* Input/output error */
37 #define ENXIO 6 /* Device not configured */
38 #define E2BIG 7 /* Argument list too long */
39 #define ENOEXEC 8 /* Exec format error */
40 #define EBADF 9 /* Bad file descriptor */
41 #define ECHILD 10 /* No child processes */
42 #define EDEADLK 11 /* Resource deadlock avoided */
43 /* 11 was EAGAIN */
44 #define ENOMEM 12 /* Cannot allocate memory */
45 #define EACCES 13 /* Permission denied */
46 #define EFAULT 14 /* Bad address */
47
48 #define ENOTBLK 15 /* Block device required */
49 #define EBUSY 16 /* Device busy */
50 #define EEXIST 17 /* File exists */
51 #define EXDEV 18 /* Cross-device link */
52 #define ENODEV 19 /* Operation not supported by device */
53 #define ENOTDIR 20 /* Not a directory */
54 #define EISDIR 21 /* Is a directory */
55 #define EINVAL 22 /* Invalid argument */
56 #define ENFILE 23 /* Too many open files in system */
57 #define EMFILE 24 /* Too many open files */
58 #define ENOTTY 25 /* Inappropriate ioctl for device */
59 #define ETXTBSY 26 /* Text file busy */
60
61 #define EFBIG 27 /* File too large */
62 #define ENOSPC 28 /* No space left on device */
63 #define ESPIPE 29 /* Illegal seek */
64 #define EROFS 30 /* Read-only filesystem */
65 #define EMLINK 31 /* Too many links */
66 #define EPIPE 32 /* Broken pipe */
67
68 /* math software */
69 #define EDOM 33 /* Numerical argument out of domain */
70 #define ERANGE 34 /* Result too large */
71
72 /* non-blocking and interrupt i/o */
73 #define EAGAIN 35 /* Resource temporarily unavailable */
74
75 #define EWOULDBLOCK EAGAIN /* Operation would block */
76 #define EINPROGRESS 36 /* Operation now in progress */
77 #define EALREADY 37 /* Operation already in progress */
78
79 /* ipc/network software -- argument errors */
80 #define ENOTSOCK 38 /* Socket operation on non-socket */
81 #define EDESTADDRREQ 39 /* Destination address required */
82 #define EMSGSIZE 40 /* Message too long */
83 #define EPROTOTYPE 41 /* Protocol wrong type for socket */
84 #define ENOPROTOOPT 42 /* Protocol not available */
85 #define EPROTONOSUPPORT 43 /* Protocol not supported */
86 #define ESOCKTNOSUPPORT 44 /* Socket type not supported */
87 #define EOPNOTSUPP 45 /* Operation not supported */
88 #define ENOTSUP EOPNOTSUPP /* Operation not supported */
89 #define EPFNOSUPPORT 46 /* Protocol family not supported */
90 #define EAFNOSUPPORT 47 /* Address family not supported by protocol family */
91 #define EADDRINUSE 48 /* Address already in use */
92 #define EADDRNOTAVAIL 49 /* Can't assign requested address */
93
94 /* ipc/network software -- operational errors */
95 #define ENETDOWN 50 /* Network is down */
96 #define ENETUNREACH 51 /* Network is unreachable */
97 #define ENETRESET 52 /* Network dropped connection on reset */
98 #define ECONNABORTED 53 /* Software caused connection abort */
99 #define ECONNRESET 54 /* Connection reset by peer */
100 #define ENOBUFS 55 /* No buffer space available */
101 #define EISCONN 56 /* Socket is already connected */
102 #define ENOTCONN 57 /* Socket is not connected */
103 #define ESHUTDOWN 58 /* Can't send after socket shutdown */
104 #define ETOOMANYREFS 59 /* Too many references: can't splice */
105 #define ETIMEDOUT 60 /* Operation timed out */
106 #define ECONNREFUSED 61 /* Connection refused */
107
108 #define ELOOP 62 /* Too many levels of symbolic links */
109
110 #define ENAMETOOLONG 63
111
112 /* should be rearranged */
113 #define EHOSTDOWN 64 /* Host is down */
114 #define EHOSTUNREACH 65 /* No route to host */
115 #define ENOTEMPTY 66 /* Directory not empty */
116
117 /* quotas & mush */
118 #define EPROCLIM 67 /* Too many processes */
119 #define EUSERS 68 /* Too many users */
120 #define EDQUOT 69 /* Disc quota exceeded */
121
122 /* Network File System */
123 #define ESTALE 70 /* Stale NFS file handle */
124 #define EREMOTE 71 /* Too many levels of remote in path */
125 #define EBADRPC 72 /* RPC struct is bad */
126 #define ERPCMISMATCH 73 /* RPC version wrong */
127 #define EPROGUNAVAIL 74 /* RPC prog. not avail */
128 #define EPROGMISMATCH 75 /* Program version wrong */
129 #define EPROCUNAVAIL 76 /* Bad procedure for program */
130
131 #define ENOLCK 77 /* No locks available */
132 #define ENOSYS 78 /* Function not implemented */
133
134 #define EFTYPE 79 /* Inappropriate file type or format */
135 #define EAUTH 80 /* Authentication error */
136 #define ENEEDAUTH 81 /* Need authenticator */
137 #define EIDRM 82 /* Identifier removed */
138 #define ENOMSG 83 /* No message of desired type */
139 #define EOVERFLOW 84 /* Value too large to be stored in data type */
140 #define ECANCELED 85 /* Operation canceled */
141 #define EILSEQ 86 /* Illegal byte sequence */
142 #define ENOATTR 87 /* Attribute not found */
143
144 #define EDOOFUS 88 /* Programming error */
145
146 #define EBADMSG 89 /* Bad message */
147 #define EMULTIHOP 90 /* Multihop attempted */
148 #define ENOLINK 91 /* Link has been severed */
149 #define EPROTO 92 /* Protocol error */
150
151 #define ENOTCAPABLE 93 /* Capabilities insufficient */
152 #define ECAPMODE 94 /* Not permitted in capability mode */
153 #define ENOTRECOVERABLE 95 /* State not recoverable */
154 #define EOWNERDEAD 96 /* Previous owner died */
155
156 #define ELAST 96 /* Must be equal largest errno */
157
158 #endif /* !_SYS_ERNRO_H_ */