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.

92 lines
2.5 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. # _____ ___ ____ ___ ____
  3. # ____| | ____| | | |____|
  4. # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
  5. #-----------------------------------------------------------------------
  6. # (c) 2003 Marcus R. Brown (mrbrown@0xd6.org)
  7. # Licenced under Academic Free License version 2.0
  8. # Review ps2sdk README & LICENSE files for further details.
  9. */
  10. /**
  11. * @file
  12. * Error codes shared across ps2lib.
  13. */
  14. #ifndef __PS2LIB_ERR_H__
  15. #define __PS2LIB_ERR_H__
  16. /* Some of these error codes are taken from libc, since a few of them
  17. overlap with errors returned by the IOP kernel. Some others have been
  18. taken from [RO]man's PS2 BIOS reversing project. The rest were arbitrarily
  19. created.
  20. Feel free to add new error codes where appropriate - just make sure you use
  21. them! */
  22. /* Guide to prefixes:
  23. LIB - ps2lib library-specific errors
  24. IOP - IOP kernel module/subsystem
  25. LF - IOP executable file loader
  26. SIF - libkernel SIF library
  27. */
  28. enum _ps2lib_errors {
  29. /** Generic (unmapped) error. */
  30. E_LIB_ERROR = 1,
  31. /* Erorrs shared with libc. */
  32. /** libc: File not found. */
  33. E_LIB_FILE_NOT_FOUND = 2,
  34. /** libc: I/O error. */
  35. E_LIB_IO_ERROR = 5,
  36. /** libc: No more memory. */
  37. E_LIB_OUT_OF_MEMORY = 12,
  38. /** libc: Math arg out of domain of func */
  39. E_LIB_MATH_DOMAIN = 33,
  40. /** libc: Math result not representable */
  41. E_LIB_MATH_RANGE = 34,
  42. /* Errors returned by the IOP kernel and system modules. */
  43. /** IOP is in exception context. */
  44. E_IOP_INTR_CONTEXT = 100,
  45. /** inter IRX dependancy error. */
  46. E_IOP_DEPENDANCY = 200,
  47. /** Invalid IRX module. */
  48. E_LF_NOT_IRX = 201,
  49. /** Unable to open executable file. */
  50. E_LF_FILE_NOT_FOUND = 203,
  51. /** Error while accessing file. */
  52. E_LF_FILE_IO_ERROR = 204,
  53. /** IOP is out of memory. */
  54. E_IOP_NO_MEMORY = 400,
  55. /* Library-specific (API) errors. */
  56. /** Unable to initialize library. */
  57. E_LIB_API_INIT = 0xd601,
  58. /** Couldn't create semaphore. */
  59. E_LIB_SEMA_CREATE = 0xd602,
  60. /** Couldn't create thread. */
  61. E_LIB_THREAD_CREATE = 0xd603,
  62. /** Couldn't execute thread. */
  63. E_LIB_THREAD_START = 0xd604,
  64. /** Unsupported/unimplemented function. */
  65. E_LIB_UNSUPPORTED = 0xd605,
  66. /** Invalid argument. */
  67. E_LIB_INVALID_ARG = 0xd606,
  68. /* SIF library */
  69. /** Can't allocate SIF packet. */
  70. E_SIF_PKT_ALLOC = 0xd610,
  71. /** Can't send SIF packet. */
  72. E_SIF_PKT_SEND = 0xd611,
  73. /** Couldn't bind to server. */
  74. E_SIF_RPC_BIND = 0xd612,
  75. /** Couldn't execute RPC call. */
  76. E_SIF_RPC_CALL = 0xd613,
  77. };
  78. #endif /* __PS2LIB_ERR_H__ */