Sony PlayStation2 Study
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

411 lines
11 KiB

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