s/qmail  3.3.23
Next generation secure email transport
error_str.c
Go to the documentation of this file.
1 #include <errno.h>
2 #include "error.h"
3 
4 #define X(e,s) if (i == e) return s;
5 
6 char *error_str(int i)
7 {
8  X(0,"no error")
9  X(error_intr,"interrupted system call")
10  X(error_nomem,"out of memory")
11  X(error_noent,"file does not exist")
12  X(error_txtbsy,"text busy")
13  X(error_io,"input/output error")
14  X(error_exist,"file already exists")
15  X(error_timeout,"timed out")
16  X(error_inprogress,"operation in progress")
17  X(error_again,"temporary failure")
18  X(error_wouldblock,"input/output would block")
19  X(error_pipe,"broken pipe")
20  X(error_perm,"permission denied")
21  X(error_acces,"access denied")
22 #ifdef ESRCH
23  X(ESRCH,"no such process")
24 #endif
25 #ifdef ENXIO
26  X(ENXIO,"device not configured")
27 #endif
28 #ifdef E2BIG
29  X(E2BIG,"argument list too long")
30 #endif
31 #ifdef ENOEXEC
32  X(ENOEXEC,"exec format error")
33 #endif
34 #ifdef EBADF
35  X(EBADF,"file descriptor not open")
36 #endif
37 #ifdef ECHILD
38  X(ECHILD,"no child processes")
39 #endif
40 #ifdef EDEADLK
41  X(EDEADLK,"operation would cause deadlock")
42 #endif
43 #ifdef EFAULT
44  X(EFAULT,"bad address")
45 #endif
46 #ifdef ENOTBLK
47  X(ENOTBLK,"not a block device")
48 #endif
49 #ifdef EBUSY
50  X(EBUSY,"device busy")
51 #endif
52 #ifdef EXDEV
53  X(EXDEV,"cross-device link")
54 #endif
55 #ifdef ENODEV
56  X(ENODEV,"device does not support operation")
57 #endif
58 #ifdef ENOTDIR
59  X(ENOTDIR,"not a directory")
60 #endif
61 #ifdef EISDIR
62  X(EISDIR,"is a directory")
63 #endif
64 #ifdef EINVAL
65  X(EINVAL,"invalid argument")
66 #endif
67 #ifdef ENFILE
68  X(ENFILE,"system cannot open more files")
69 #endif
70 #ifdef EMFILE
71  X(EMFILE,"process cannot open more files")
72 #endif
73 #ifdef ENOTTY
74  X(ENOTTY,"not a tty")
75 #endif
76 #ifdef EFBIG
77  X(EFBIG,"file too big")
78 #endif
79 #ifdef ENOSPC
80  X(ENOSPC,"out of disk space")
81 #endif
82 #ifdef ESPIPE
83  X(ESPIPE,"unseekable descriptor")
84 #endif
85 #ifdef EROFS
86  X(EROFS,"read-only file system")
87 #endif
88 #ifdef EMLINK
89  X(EMLINK,"too many links")
90 #endif
91 #ifdef EDOM
92  X(EDOM,"input out of range")
93 #endif
94 #ifdef ERANGE
95  X(ERANGE,"output out of range")
96 #endif
97 #ifdef EALREADY
98  X(EALREADY,"operation already in progress")
99 #endif
100 #ifdef ENOTSOCK
101  X(ENOTSOCK,"not a socket")
102 #endif
103 #ifdef EDESTADDRREQ
104  X(EDESTADDRREQ,"destination address required")
105 #endif
106 #ifdef EMSGSIZE
107  X(EMSGSIZE,"message too long")
108 #endif
109 #ifdef EPROTOTYPE
110  X(EPROTOTYPE,"incorrect protocol type")
111 #endif
112 #ifdef ENOPROTOOPT
113  X(ENOPROTOOPT,"protocol not available")
114 #endif
115 #ifdef EPROTONOSUPPORT
116  X(EPROTONOSUPPORT,"protocol not supported")
117 #endif
118 #ifdef ESOCKTNOSUPPORT
119  X(ESOCKTNOSUPPORT,"socket type not supported")
120 #endif
121 #ifdef EOPNOTSUPP
122  X(EOPNOTSUPP,"operation not supported")
123 #endif
124 #ifdef EPFNOSUPPORT
125  X(EPFNOSUPPORT,"protocol family not supported")
126 #endif
127 #ifdef EAFNOSUPPORT
128  X(EAFNOSUPPORT,"address family not supported")
129 #endif
130 #ifdef EADDRINUSE
131  X(EADDRINUSE,"address already used")
132 #endif
133 #ifdef EADDRNOTAVAIL
134  X(EADDRNOTAVAIL,"address not available")
135 #endif
136 #ifdef ENETDOWN
137  X(ENETDOWN,"network down")
138 #endif
139 #ifdef ENETUNREACH
140  X(ENETUNREACH,"network unreachable")
141 #endif
142 #ifdef ENETRESET
143  X(ENETRESET,"network reset")
144 #endif
145 #ifdef ECONNABORTED
146  X(ECONNABORTED,"connection aborted")
147 #endif
148 #ifdef ECONNRESET
149  X(ECONNRESET,"connection reset")
150 #endif
151 #ifdef ENOBUFS
152  X(ENOBUFS,"out of buffer space")
153 #endif
154 #ifdef EISCONN
155  X(EISCONN,"already connected")
156 #endif
157 #ifdef ENOTCONN
158  X(ENOTCONN,"not connected")
159 #endif
160 #ifdef ESHUTDOWN
161  X(ESHUTDOWN,"socket shut down")
162 #endif
163 #ifdef ETOOMANYREFS
164  X(ETOOMANYREFS,"too many references")
165 #endif
166 #ifdef ECONNREFUSED
167  X(ECONNREFUSED,"connection refused")
168 #endif
169 #ifdef ELOOP
170  X(ELOOP,"symbolic link loop")
171 #endif
172 #ifdef ENAMETOOLONG
173  X(ENAMETOOLONG,"file name too long")
174 #endif
175 #ifdef EHOSTDOWN
176  X(EHOSTDOWN,"host down")
177 #endif
178 #ifdef EHOSTUNREACH
179  X(EHOSTUNREACH,"host unreachable")
180 #endif
181 #ifdef ENOTEMPTY
182  X(ENOTEMPTY,"directory not empty")
183 #endif
184 #ifdef EPROCLIM
185  X(EPROCLIM,"too many processes")
186 #endif
187 #ifdef EUSERS
188  X(EUSERS,"too many users")
189 #endif
190 #ifdef EDQUOT
191  X(EDQUOT,"disk quota exceeded")
192 #endif
193 #ifdef ESTALE
194  X(ESTALE,"stale NFS file handle")
195 #endif
196 #ifdef EREMOTE
197  X(EREMOTE,"too many levels of remote in path")
198 #endif
199 #ifdef EBADRPC
200  X(EBADRPC,"RPC structure is bad")
201 #endif
202 #ifdef ERPCMISMATCH
203  X(ERPCMISMATCH,"RPC version mismatch")
204 #endif
205 #ifdef EPROGUNAVAIL
206  X(EPROGUNAVAIL,"RPC program unavailable")
207 #endif
208 #ifdef EPROGMISMATCH
209  X(EPROGMISMATCH,"program version mismatch")
210 #endif
211 #ifdef EPROCUNAVAIL
212  X(EPROCUNAVAIL,"bad procedure for program")
213 #endif
214 #ifdef ENOLCK
215  X(ENOLCK,"no locks available")
216 #endif
217 #ifdef ENOSYS
218  X(ENOSYS,"system call not available")
219 #endif
220 #ifdef EFTYPE
221  X(EFTYPE,"bad file type")
222 #endif
223 #ifdef EAUTH
224  X(EAUTH,"authentication error")
225 #endif
226 #ifdef ENEEDAUTH
227  X(ENEEDAUTH,"not authenticated")
228 #endif
229 #ifdef ENOSTR
230  X(ENOSTR,"not a stream device")
231 #endif
232 #ifdef ETIME
233  X(ETIME,"timer expired")
234 #endif
235 #ifdef ENOSR
236  X(ENOSR,"out of stream resources")
237 #endif
238 #ifdef ENOMSG
239  X(ENOMSG,"no message of desired type")
240 #endif
241 #ifdef EBADMSG
242  X(EBADMSG,"bad message type")
243 #endif
244 #ifdef EIDRM
245  X(EIDRM,"identifier removed")
246 #endif
247 #ifdef ENONET
248  X(ENONET,"machine not on network")
249 #endif
250 #ifdef ERREMOTE
251  X(ERREMOTE,"object not local")
252 #endif
253 #ifdef ENOLINK
254  X(ENOLINK,"link severed")
255 #endif
256 #ifdef EADV
257  X(EADV,"advertise error")
258 #endif
259 #ifdef ESRMNT
260  X(ESRMNT,"srmount error")
261 #endif
262 #ifdef ECOMM
263  X(ECOMM,"communication error")
264 #endif
265 #ifdef EPROTO
266  X(EPROTO,"protocol error")
267 #endif
268 #ifdef EMULTIHOP
269  X(EMULTIHOP,"multihop attempted")
270 #endif
271 #ifdef EREMCHG
272  X(EREMCHG,"remote address changed")
273 #endif
274  return "unknown error";
275 }
int error_acces
Definition: error.c:90
int error_exist
Definition: error.c:41
int error_again
Definition: error.c:69
int error_pipe
Definition: error.c:76
int error_wouldblock
Definition: error.c:62
int error_nomem
Definition: error.c:13
char * error_str(int i)
Definition: error_str.c:6
int error_txtbsy
Definition: error.c:27
unsigned i
Definition: matchup.c:36
int error_intr
Definition: error.c:6
int error_noent
Definition: error.c:20
#define X(e, s)
Definition: error_str.c:4
int error_perm
Definition: error.c:83
int error_timeout
Definition: error.c:48
int error_io
Definition: error.c:34
int error_inprogress
Definition: error.c:55