71 |
7u83 |
1 |
#ifndef __TENDRA_ERRNO_H
|
|
|
2 |
#define __TENDRA_ERRNO_H
|
|
|
3 |
|
72 |
7u83 |
4 |
#undef _STANDALONE
|
|
|
5 |
#undef _KERNEL
|
80 |
7u83 |
6 |
/* #include_next <errno.h> */
|
72 |
7u83 |
7 |
|
80 |
7u83 |
8 |
/* extern int errno; */
|
|
|
9 |
/* #define EDOM 33 *//* Numerical argument out of domain */
|
|
|
10 |
/* #define ERANGE 34 *//* Result too large */
|
72 |
7u83 |
11 |
|
80 |
7u83 |
12 |
#define EPERM 1 /* Operation not permitted */
|
|
|
13 |
#define ENOENT 2 /* No such file or directory */
|
|
|
14 |
#define ESRCH 3 /* No such process */
|
|
|
15 |
#define EINTR 4 /* Interrupted system call */
|
|
|
16 |
#define EIO 5 /* Input/output error */
|
|
|
17 |
#define ENXIO 6 /* Device not configured */
|
|
|
18 |
#define E2BIG 7 /* Argument list too long */
|
|
|
19 |
#define ENOEXEC 8 /* Exec format error */
|
|
|
20 |
#define EBADF 9 /* Bad file descriptor */
|
|
|
21 |
#define ECHILD 10 /* No child processes */
|
|
|
22 |
#define EDEADLK 11 /* Resource deadlock avoided */
|
|
|
23 |
/* 11 was EAGAIN */
|
|
|
24 |
#define ENOMEM 12 /* Cannot allocate memory */
|
|
|
25 |
#define EACCES 13 /* Permission denied */
|
|
|
26 |
#define EFAULT 14 /* Bad address */
|
72 |
7u83 |
27 |
#ifndef _POSIX_SOURCE
|
80 |
7u83 |
28 |
#define ENOTBLK 15 /* Block device required */
|
72 |
7u83 |
29 |
#endif
|
80 |
7u83 |
30 |
#define EBUSY 16 /* Device busy */
|
|
|
31 |
#define EEXIST 17 /* File exists */
|
|
|
32 |
#define EXDEV 18 /* Cross-device link */
|
|
|
33 |
#define ENODEV 19 /* Operation not supported by device */
|
|
|
34 |
#define ENOTDIR 20 /* Not a directory */
|
|
|
35 |
#define EISDIR 21 /* Is a directory */
|
|
|
36 |
#define EINVAL 22 /* Invalid argument */
|
|
|
37 |
#define ENFILE 23 /* Too many open files in system */
|
|
|
38 |
#define EMFILE 24 /* Too many open files */
|
|
|
39 |
#define ENOTTY 25 /* Inappropriate ioctl for device */
|
72 |
7u83 |
40 |
#ifndef _POSIX_SOURCE
|
80 |
7u83 |
41 |
#define ETXTBSY 26 /* Text file busy */
|
72 |
7u83 |
42 |
#endif
|
80 |
7u83 |
43 |
#define EFBIG 27 /* File too large */
|
|
|
44 |
#define ENOSPC 28 /* No space left on device */
|
|
|
45 |
#define ESPIPE 29 /* Illegal seek */
|
|
|
46 |
#define EROFS 30 /* Read-only filesystem */
|
|
|
47 |
#define EMLINK 31 /* Too many links */
|
|
|
48 |
#define EPIPE 32 /* Broken pipe */
|
72 |
7u83 |
49 |
|
|
|
50 |
/* math software */
|
80 |
7u83 |
51 |
#define EDOM 33 /* Numerical argument out of domain */
|
|
|
52 |
#define ERANGE 34 /* Result too large */
|
71 |
7u83 |
53 |
|
72 |
7u83 |
54 |
/* non-blocking and interrupt i/o */
|
80 |
7u83 |
55 |
#define EAGAIN 35 /* Resource temporarily unavailable */
|
72 |
7u83 |
56 |
#ifndef _POSIX_SOURCE
|
80 |
7u83 |
57 |
#define EWOULDBLOCK EAGAIN /* Operation would block */
|
|
|
58 |
#define EINPROGRESS 36 /* Operation now in progress */
|
|
|
59 |
#define EALREADY 37 /* Operation already in progress */
|
71 |
7u83 |
60 |
|
72 |
7u83 |
61 |
/* ipc/network software -- argument errors */
|
80 |
7u83 |
62 |
#define ENOTSOCK 38 /* Socket operation on non-socket */
|
|
|
63 |
#define EDESTADDRREQ 39 /* Destination address required */
|
|
|
64 |
#define EMSGSIZE 40 /* Message too long */
|
|
|
65 |
#define EPROTOTYPE 41 /* Protocol wrong type for socket */
|
|
|
66 |
#define ENOPROTOOPT 42 /* Protocol not available */
|
|
|
67 |
#define EPROTONOSUPPORT 43 /* Protocol not supported */
|
|
|
68 |
#define ESOCKTNOSUPPORT 44 /* Socket type not supported */
|
|
|
69 |
#define EOPNOTSUPP 45 /* Operation not supported */
|
72 |
7u83 |
70 |
#define ENOTSUP EOPNOTSUPP /* Operation not supported */
|
80 |
7u83 |
71 |
#define EPFNOSUPPORT 46 /* Protocol family not supported */
|
|
|
72 |
#define EAFNOSUPPORT 47 /* Address family not supported by protocol
|
|
|
73 |
* family */
|
|
|
74 |
#define EADDRINUSE 48 /* Address already in use */
|
|
|
75 |
#define EADDRNOTAVAIL 49 /* Can't assign requested address */
|
72 |
7u83 |
76 |
|
|
|
77 |
/* ipc/network software -- operational errors */
|
80 |
7u83 |
78 |
#define ENETDOWN 50 /* Network is down */
|
|
|
79 |
#define ENETUNREACH 51 /* Network is unreachable */
|
|
|
80 |
#define ENETRESET 52 /* Network dropped connection on reset */
|
|
|
81 |
#define ECONNABORTED 53 /* Software caused connection abort */
|
|
|
82 |
#define ECONNRESET 54 /* Connection reset by peer */
|
|
|
83 |
#define ENOBUFS 55 /* No buffer space available */
|
|
|
84 |
#define EISCONN 56 /* Socket is already connected */
|
|
|
85 |
#define ENOTCONN 57 /* Socket is not connected */
|
|
|
86 |
#define ESHUTDOWN 58 /* Can't send after socket shutdown */
|
|
|
87 |
#define ETOOMANYREFS 59 /* Too many references: can't splice */
|
|
|
88 |
#define ETIMEDOUT 60 /* Operation timed out */
|
|
|
89 |
#define ECONNREFUSED 61 /* Connection refused */
|
72 |
7u83 |
90 |
|
80 |
7u83 |
91 |
#define ELOOP 62 /* Too many levels of symbolic links */
|
|
|
92 |
#endif /* _POSIX_SOURCE */
|
|
|
93 |
#define ENAMETOOLONG 63 /* File name too long */
|
72 |
7u83 |
94 |
|
|
|
95 |
/* should be rearranged */
|
|
|
96 |
#ifndef _POSIX_SOURCE
|
80 |
7u83 |
97 |
#define EHOSTDOWN 64 /* Host is down */
|
|
|
98 |
#define EHOSTUNREACH 65 /* No route to host */
|
|
|
99 |
#endif /* _POSIX_SOURCE */
|
|
|
100 |
#define ENOTEMPTY 66 /* Directory not empty */
|
72 |
7u83 |
101 |
|
|
|
102 |
/* quotas & mush */
|
|
|
103 |
#ifndef _POSIX_SOURCE
|
80 |
7u83 |
104 |
#define EPROCLIM 67 /* Too many processes */
|
|
|
105 |
#define EUSERS 68 /* Too many users */
|
|
|
106 |
#define EDQUOT 69 /* Disc quota exceeded */
|
72 |
7u83 |
107 |
|
|
|
108 |
/* Network File System */
|
80 |
7u83 |
109 |
#define ESTALE 70 /* Stale NFS file handle */
|
|
|
110 |
#define EREMOTE 71 /* Too many levels of remote in path */
|
|
|
111 |
#define EBADRPC 72 /* RPC struct is bad */
|
|
|
112 |
#define ERPCMISMATCH 73 /* RPC version wrong */
|
|
|
113 |
#define EPROGUNAVAIL 74 /* RPC prog. not avail */
|
|
|
114 |
#define EPROGMISMATCH 75 /* Program version wrong */
|
|
|
115 |
#define EPROCUNAVAIL 76 /* Bad procedure for program */
|
|
|
116 |
#endif /* _POSIX_SOURCE */
|
72 |
7u83 |
117 |
|
80 |
7u83 |
118 |
#define ENOLCK 77 /* No locks available */
|
|
|
119 |
#define ENOSYS 78 /* Function not implemented */
|
72 |
7u83 |
120 |
|
|
|
121 |
#ifndef _POSIX_SOURCE
|
80 |
7u83 |
122 |
#define EFTYPE 79 /* Inappropriate file type or format */
|
|
|
123 |
#define EAUTH 80 /* Authentication error */
|
|
|
124 |
#define ENEEDAUTH 81 /* Need authenticator */
|
|
|
125 |
#define EIDRM 82 /* Identifier removed */
|
|
|
126 |
#define ENOMSG 83 /* No message of desired type */
|
|
|
127 |
#define EOVERFLOW 84 /* Value too large to be stored in data type */
|
|
|
128 |
#define ECANCELED 85 /* Operation canceled */
|
|
|
129 |
#define EILSEQ 86 /* Illegal byte sequence */
|
|
|
130 |
#define ENOATTR 87 /* Attribute not found */
|
72 |
7u83 |
131 |
|
80 |
7u83 |
132 |
#define EDOOFUS 88 /* Programming error */
|
|
|
133 |
#endif /* _POSIX_SOURCE */
|
72 |
7u83 |
134 |
|
80 |
7u83 |
135 |
#define EBADMSG 89 /* Bad message */
|
|
|
136 |
#define EMULTIHOP 90 /* Multihop attempted */
|
|
|
137 |
#define ENOLINK 91 /* Link has been severed */
|
|
|
138 |
#define EPROTO 92 /* Protocol error */
|
72 |
7u83 |
139 |
|
|
|
140 |
#ifndef _POSIX_SOURCE
|
80 |
7u83 |
141 |
#define ENOTCAPABLE 93 /* Capabilities insufficient */
|
|
|
142 |
#define ECAPMODE 94 /* Not permitted in capability mode */
|
|
|
143 |
#define ENOTRECOVERABLE 95 /* State not recoverable */
|
|
|
144 |
#define EOWNERDEAD 96 /* Previous owner died */
|
|
|
145 |
#endif /* _POSIX_SOURCE */
|
72 |
7u83 |
146 |
|
|
|
147 |
#ifndef _POSIX_SOURCE
|
80 |
7u83 |
148 |
#define ELAST 96 /* Must be equal largest errno */
|
|
|
149 |
#endif /* _POSIX_SOURCE */
|
72 |
7u83 |
150 |
|
|
|
151 |
#if defined(_KERNEL) || defined(_WANT_KERNEL_ERRNO)
|
|
|
152 |
/* pseudo-errors returned inside kernel to modify return to process */
|
80 |
7u83 |
153 |
#define ERESTART (-1) /* restart syscall */
|
|
|
154 |
#define EJUSTRETURN (-2) /* don't modify regs, just return */
|
|
|
155 |
#define ENOIOCTL (-3) /* ioctl not handled by this layer */
|
|
|
156 |
#define EDIRIOCTL (-4) /* do direct ioctl in GEOM */
|
|
|
157 |
#define ERELOOKUP (-5) /* retry the directory lookup */
|
71 |
7u83 |
158 |
#endif
|
|
|
159 |
|
80 |
7u83 |
160 |
int *__error(void);
|
74 |
7u83 |
161 |
#define errno (* __error())
|
72 |
7u83 |
162 |
|
80 |
7u83 |
163 |
|
|
|
164 |
/* Solaris SysV */
|
|
|
165 |
#ifdef _SVID_SOURCE
|
|
|
166 |
|
|
|
167 |
#define ENOSTR 60
|
|
|
168 |
#define ENOSR 63
|
|
|
169 |
#define ETIME 62
|
|
|
170 |
#define ECOMM 70
|
|
|
171 |
#define ELIBACC 83
|
|
|
172 |
#define ELIBBAD 84
|
|
|
173 |
#define ELIBSCN 85
|
|
|
174 |
#define ELIBMAX 86
|
|
|
175 |
#define ELIBEXEC 87
|
|
|
176 |
#define ERESTART 91
|
|
|
177 |
#define ESTRPIPE 92
|
|
|
178 |
|
72 |
7u83 |
179 |
#endif
|
|
|
180 |
|
80 |
7u83 |
181 |
|
|
|
182 |
#endif
|