PS2SDK
PS2 Homebrew Libraries
errno.h
Go to the documentation of this file.
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Copyright ps2dev - http://www.ps2dev.org
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
9 */
10 
17 #ifndef __ERRNO_H__
18 #define __ERRNO_H__
19 
21 #define EPERM 1
22 
23 #define ENOENT 2
24 
25 #define ESRCH 3
26 
27 #define EINTR 4
28 
29 #define EIO 5
30 
31 #define ENXIO 6
32 
33 #define E2BIG 7
34 
35 #define ENOEXEC 8
36 
37 #define EBADF 9
38 
39 #define ECHILD 10
40 
41 #define EAGAIN 11
42 
43 #define ENOMEM 12
44 
45 #define EACCES 13
46 
47 #define EFAULT 14
48 
49 #define ENOTBLK 15
50 
51 #define EBUSY 16
52 
53 #define EEXIST 17
54 
55 #define EXDEV 18
56 
57 #define ENODEV 19
58 
59 #define ENOTDIR 20
60 
61 #define EISDIR 21
62 
63 #define EINVAL 22
64 
65 #define ENFILE 23
66 
67 #define EMFILE 24
68 
69 #define ENOTTY 25
70 
71 #define ETXTBSY 26
72 
73 #define EFBIG 27
74 
75 #define ENOSPC 28
76 
77 #define ESPIPE 29
78 
79 #define EROFS 30
80 
81 #define EMLINK 31
82 
83 #define EPIPE 32
84 
85 #define EDOM 33
86 
87 #define ERANGE 34
88 
89 #define ENOMSG 35
90 
91 #define EIDRM 36
92 
93 #define ECHRNG 37
94 
95 #define EL2NSYNC 38
96 
97 #define EL3HLT 39
98 
99 #define EL3RST 40
100 
101 #define EWOULDBLOCK EAGAIN
102 
103 #define ELNRNG 41
104 
105 #define EUNATCH 42
106 
107 #define ENOCSI 43
108 
109 #define EL2HLT 44
110 
111 #define EDEADLK 45
112 
113 #define ENOLCK 46
114 
115 #define EFORMAT 47
116 
117 #define EUNSUP 48
118 
119 #define EBADE 50
120 
121 #define EBADR 51
122 
123 #define EXFULL 52
124 
125 #define ENOANO 53
126 
127 #define EBADRQC 54
128 
129 #define EBADSLT 55
130 
131 #define EDEADLOCK 56
132 
133 #define EBFONT 57
134 
135 #define ENOSTR 60
136 
137 #define ENODATA 61
138 
139 #define ETIME 62
140 
141 #define ENOSR 63
142 
143 #define ENONET 64
144 
145 #define ENOPKG 65
146 
147 #define EREMOTE 66
148 
149 #define ENOLINK 67
150 
151 #define EADV 68
152 
153 #define ESRMNT 69
154 
155 #define ECOMM 70
156 
157 #define EPROTO 71
158 
159 #define EMULTIHOP 74
160 
161 #define ELBIN 75
162 
163 #define EDOTDOT 76
164 
165 #define EBADMSG 77
166 
167 #define EFTYPE 79
168 
169 #define ENOTUNIQ 80
170 
171 #define EBADFD 81
172 
173 #define EREMCHG 82
174 
175 #define ELIBACC 83
176 
177 #define ELIBBAD 84
178 
179 #define ELIBSCN 85
180 
181 #define ELIBMAX 86
182 
183 #define ELIBEXEC 87
184 
185 #define ENOSYS 88
186 
187 #define ENMFILE 89
188 
189 #define ENOTEMPTY 90
190 
191 #define ENAMETOOLONG 91
192 
193 #define ELOOP 92
194 
195 #define EOPNOTSUPP 95
196 
197 #define EPFNOSUPPORT 96
198 
199 #define ECONNRESET 104
200 
201 #define ENOBUFS 105
202 
203 #define EAFNOSUPPORT 106
204 
205 #define EPROTOTYPE 107
206 
207 #define ENOTSOCK 108
208 
209 #define ENOPROTOOPT 109
210 
211 #define ESHUTDOWN 110
212 
213 #define ECONNREFUSED 111
214 
215 #define EADDRINUSE 112
216 
217 #define ECONNABORTED 113
218 
219 #define ENETUNREACH 114
220 
221 #define ENETDOWN 115
222 
223 #define ETIMEDOUT 116
224 
225 #define EHOSTDOWN 117
226 
227 #define EHOSTUNREACH 118
228 
229 #define EINPROGRESS 119
230 
231 #define EALREADY 120
232 
233 #define EDESTADDRREQ 121
234 
235 #define EMSGSIZE 122
236 
237 #define EPROTONOSUPPORT 123
238 
239 #define ESOCKTNOSUPPORT 124
240 
241 #define EADDRNOTAVAIL 125
242 
243 #define ENETRESET 126
244 
245 #define EISCONN 127
246 
247 #define ENOTCONN 128
248 
249 #define ETOOMANYREFS 129
250 
251 #define EPROCLIM 130
252 
253 #define EUSERS 131
254 
255 #define EDQUOT 132
256 
257 #define ESTALE 133
258 
259 #define ENOTSUP 134
260 
261 #define ENOMEDIUM 135
262 
263 #define ENOSHARE 136
264 
265 #define ECASECLASH 137
266 
267 #define EILSEQ 138
268 
269 #define EOVERFLOW 139
270 
271 #define ECANCELED 140
272 
273 #define ENOTRECOVERABLE 141
274 
275 #define EOWNERDEAD 142
276 
277 #define ESTRPIPE 143
278 
279 #ifndef E_USE_NAMES
280 #define error_to_string(errnum) ("")
281 #else
282 char *file_errors[] = {
283  "Success", /* 0 */
284  "Not owner", /* 1 */
285  "No such file or directory", /* 2 */
286  "No such process", /* 3 */
287  "Interrupted system call", /* 4 */
288  "I/O error", /* 5 */
289  "No such device or address", /* 6 */
290  "Arg list too long", /* 7 */
291  "Exec format error", /* 8 */
292  "Bad file number", /* 9 */
293  "No children", /* 10 */
294  "No more processes", /* 11 */
295  "Not enough space", /* 12 */
296  "Permission denied", /* 13 */
297  "Bad address", /* 14 */
298  "Block device required", /* 15 */
299  "Device or resource busy", /* 16 */
300  "File exists", /* 17 */
301  "Cross-device link", /* 18 */
302  "No such device", /* 19 */
303  "Not a directory", /* 20 */
304  "Is a directory", /* 21 */
305  "Invalid argument", /* 22 */
306  "Too many open files in system", /* 23 */
307  "File descriptor value too large", /* 24 */
308  "Not a character device", /* 25 */
309  "Text file busy", /* 26 */
310  "File too large", /* 27 */
311  "No space left on device", /* 28 */
312  "Illegal seek", /* 29 */
313  "Read-only file system", /* 30 */
314  "Too many links", /* 31 */
315  "Broken pipe", /* 32 */
316  "Mathematics argument out of domain of function", /* 33 */
317  "Result too large", /* 34 */
318  "No message of desired type", /* 35 */
319  "Identifier removed", /* 36 */
320  "Channel number out of range", /* 37 */
321  "Level 2 not synchronized", /* 38 */
322  "Level 3 halted", /* 39 */
323  "Level 3 reset", /* 40 */
324  "Link number out of range", /* 41 */
325  "Protocol driver not attached", /* 42 */
326  "No CSI structure available", /* 43 */
327  "Level 2 halted", /* 44 */
328  "Deadlock", /* 45 */
329  "No lock", /* 46 */
330  "Bad file format", /* 47 */
331  "Operation unsupported by device", /* 48 */
332  "",
333  "Invalid exchange", /* 50 */
334  "Invalid request descriptor", /* 51 */
335  "Exchange full", /* 52 */
336  "No anode", /* 53 */
337  "Invalid request code", /* 54 */
338  "Invalid slot", /* 55 */
339  "File locking deadlock error", /* 56 */
340  "Bad font file fmt", /* 57 */
341  "",
342  "",
343  "Not a stream", /* 60 */
344  "No data (for no delay io)", /* 61 */
345  "Stream ioctl timeout", /* 62 */
346  "No stream resources", /* 63 */
347  "Machine is not on the network", /* 64 */
348  "Package not installed", /* 65 */
349  "The object is remote", /* 66 */
350  "Virtual circuit is gone", /* 67 */
351  "Advertise error", /* 68 */
352  "Srmount error", /* 69 */
353  "Communication error on send", /* 70 */
354  "Protocol error", /* 71 */
355  "",
356  "",
357  "Multihop attempted", /* 74 */
358  "Inode is remote (not really error)", /* 75 */
359  "Cross mount point (not really error)", /* 76 */
360  "Bad message", /* 77 */
361  "",
362  "Inappropriate file type or format", /* 79 */
363  "Given log. name not unique", /* 80 */
364  "f.d. invalid for this operation", /* 81 */
365  "Remote address changed", /* 82 */
366  "Can't access a needed shared lib", /* 83 */
367  "Accessing a corrupted shared lib", /* 84 */
368  ".lib section in a.out corrupted", /* 85 */
369  "Attempting to link in too many libs", /* 86 */
370  "Attempting to exec a shared library", /* 87 */
371  "Function not implemented", /* 88 */
372  "No more files", /* 89 */
373  "Directory not empty", /* 90 */
374  "File or path name too long", /* 91 */
375  "Too many symbolic links", /* 92 */
376  "",
377  "",
378  "Operation not supported on socket", /* 95 */
379  "Protocol family not supported", /* 96 */
380  "",
381  "",
382  "",
383  "",
384  "",
385  "",
386  "",
387  "Connection reset by peer", /* 104 */
388  "No buffer space available", /* 105 */
389  "Address family not supported by protocol family", /* 106 */
390  "Protocol wrong type for socket", /* 107 */
391  "Socket operation on non-socket", /* 108 */
392  "Protocol not available", /* 109 */
393  "Can't send after socket shutdown", /* 110 */
394  "Connection refused", /* 111 */
395  "Address already in use", /* 112 */
396  "Software caused connection abort", /* 113 */
397  "Network is unreachable", /* 114 */
398  "Network interface is not configured", /* 115 */
399  "Connection timed out", /* 116 */
400  "Host is down", /* 117 */
401  "Host is unreachable", /* 118 */
402  "Connection already in progress", /* 119 */
403  "Socket already connected", /* 120 */
404  "Destination address required", /* 121 */
405  "Message too long", /* 122 */
406  "Unknown protocol", /* 123 */
407  "Socket type not supported", /* 124 */
408  "Address not available", /* 125 */
409  "Connection aborted by network", /* 126 */
410  "Socket is already connected", /* 127 */
411  "Socket is not connected", /* 128 */
412  "Too many references: cannot splice", /* 129 */
413  "Too many processes", /* 130 */
414  "Too many users", /* 131 */
415  "Disk quota exceeded", /* 132 */
416  "Stale file handle", /* 133 */
417  "Not supported", /* 134 */
418  "No medium (in tape drive)", /* 135 */
419  "No such host or network path", /* 136 */
420  "Filename exists with different case", /* 137 */
421  "Illegal byte sequence", /* 138 */
422  "Value too large for defined data type", /* 139 */
423  "Operation canceled", /* 140 */
424  "State not recoverable", /* 141 */
425  "Previous owner died", /* 142 */
426  "Streams pipe error", /* 143 */
427 };
428 #define error_to_string(errnum) (file_errors[errnum * -1])
429 #endif
430 
431 extern int errno __attribute__((section(".data")));
432 
433 #endif /* __ERRNO_H__ */
__attribute__
Definition: gif_registers.h:38