PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
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
23#define ENOENT 2
25#define ESRCH 3
27#define EINTR 4
29#define EIO 5
31#define ENXIO 6
33#define E2BIG 7
35#define ENOEXEC 8
37#define EBADF 9
39#define ECHILD 10
41#define EAGAIN 11
43#define ENOMEM 12
45#define EACCES 13
47#define EFAULT 14
49#define ENOTBLK 15
51#define EBUSY 16
53#define EEXIST 17
55#define EXDEV 18
57#define ENODEV 19
59#define ENOTDIR 20
61#define EISDIR 21
63#define EINVAL 22
65#define ENFILE 23
67#define EMFILE 24
69#define ENOTTY 25
71#define ETXTBSY 26
73#define EFBIG 27
75#define ENOSPC 28
77#define ESPIPE 29
79#define EROFS 30
81#define EMLINK 31
83#define EPIPE 32
85#define EDOM 33
87#define ERANGE 34
89#define ENOMSG 35
91#define EIDRM 36
93#define ECHRNG 37
95#define EL2NSYNC 38
97#define EL3HLT 39
99#define EL3RST 40
101#define EWOULDBLOCK EAGAIN
103#define ELNRNG 41
105#define EUNATCH 42
107#define ENOCSI 43
109#define EL2HLT 44
111#define EDEADLK 45
113#define ENOLCK 46
115#define EFORMAT 47
117#define EUNSUP 48
119#define EBADE 50
121#define EBADR 51
123#define EXFULL 52
125#define ENOANO 53
127#define EBADRQC 54
129#define EBADSLT 55
131#define EDEADLOCK 56
133#define EBFONT 57
135#define ENOSTR 60
137#define ENODATA 61
139#define ETIME 62
141#define ENOSR 63
143#define ENONET 64
145#define ENOPKG 65
147#define EREMOTE 66
149#define ENOLINK 67
151#define EADV 68
153#define ESRMNT 69
155#define ECOMM 70
157#define EPROTO 71
159#define EMULTIHOP 74
161#define ELBIN 75
163#define EDOTDOT 76
165#define EBADMSG 77
167#define EFTYPE 79
169#define ENOTUNIQ 80
171#define EBADFD 81
173#define EREMCHG 82
175#define ELIBACC 83
177#define ELIBBAD 84
179#define ELIBSCN 85
181#define ELIBMAX 86
183#define ELIBEXEC 87
185#define ENOSYS 88
187#define ENMFILE 89
189#define ENOTEMPTY 90
191#define ENAMETOOLONG 91
193#define ELOOP 92
195#define EOPNOTSUPP 95
197#define EPFNOSUPPORT 96
199#define ECONNRESET 104
201#define ENOBUFS 105
203#define EAFNOSUPPORT 106
205#define EPROTOTYPE 107
207#define ENOTSOCK 108
209#define ENOPROTOOPT 109
211#define ESHUTDOWN 110
213#define ECONNREFUSED 111
215#define EADDRINUSE 112
217#define ECONNABORTED 113
219#define ENETUNREACH 114
221#define ENETDOWN 115
223#define ETIMEDOUT 116
225#define EHOSTDOWN 117
227#define EHOSTUNREACH 118
229#define EINPROGRESS 119
231#define EALREADY 120
233#define EDESTADDRREQ 121
235#define EMSGSIZE 122
237#define EPROTONOSUPPORT 123
239#define ESOCKTNOSUPPORT 124
241#define EADDRNOTAVAIL 125
243#define ENETRESET 126
245#define EISCONN 127
247#define ENOTCONN 128
249#define ETOOMANYREFS 129
251#define EPROCLIM 130
253#define EUSERS 131
255#define EDQUOT 132
257#define ESTALE 133
259#define ENOTSUP 134
261#define ENOMEDIUM 135
263#define ENOSHARE 136
265#define ECASECLASH 137
267#define EILSEQ 138
269#define EOVERFLOW 139
271#define ECANCELED 140
273#define ENOTRECOVERABLE 141
275#define EOWNERDEAD 142
277#define ESTRPIPE 143
278
279#ifndef E_USE_NAMES
280#define error_to_string(errnum) ("")
281#else
282char *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
431extern int errno __attribute__((section("data")));
432
433#endif /* __ERRNO_H__ */