LinuxError.cs 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. using System.Diagnostics.CodeAnalysis;
  2. namespace Ryujinx.HLE.Utilities
  3. {
  4. [SuppressMessage("ReSharper", "InconsistentNaming")]
  5. enum LinuxError
  6. {
  7. SUCCESS = 0,
  8. EPERM = 1 /* Operation not permitted */,
  9. ENOENT = 2 /* No such file or directory */,
  10. ESRCH = 3 /* No such process */,
  11. EINTR = 4 /* Interrupted system call */,
  12. EIO = 5 /* I/O error */,
  13. ENXIO = 6 /* No such device or address */,
  14. E2BIG = 7 /* Argument list too long */,
  15. ENOEXEC = 8 /* Exec format error */,
  16. EBADF = 9 /* Bad file number */,
  17. ECHILD = 10 /* No child processes */,
  18. EAGAIN = 11 /* Try again */,
  19. ENOMEM = 12 /* Out of memory */,
  20. EACCES = 13 /* Permission denied */,
  21. EFAULT = 14 /* Bad address */,
  22. ENOTBLK = 15 /* Block device required */,
  23. EBUSY = 16 /* Device or resource busy */,
  24. EEXIST = 17 /* File exists */,
  25. EXDEV = 18 /* Cross-device link */,
  26. ENODEV = 19 /* No such device */,
  27. ENOTDIR = 20 /* Not a directory */,
  28. EISDIR = 21 /* Is a directory */,
  29. EINVAL = 22 /* Invalid argument */,
  30. ENFILE = 23 /* File table overflow */,
  31. EMFILE = 24 /* Too many open files */,
  32. ENOTTY = 25 /* Not a typewriter */,
  33. ETXTBSY = 26 /* Text file busy */,
  34. EFBIG = 27 /* File too large */,
  35. ENOSPC = 28 /* No space left on device */,
  36. ESPIPE = 29 /* Illegal seek */,
  37. EROFS = 30 /* Read-only file system */,
  38. EMLINK = 31 /* Too many links */,
  39. EPIPE = 32 /* Broken pipe */,
  40. EDOM = 33 /* Math argument out of domain of func */,
  41. ERANGE = 34 /* Math result not representable */,
  42. EDEADLK = 35 /* Resource deadlock would occur */,
  43. ENAMETOOLONG = 36 /* File name too long */,
  44. ENOLCK = 37 /* No record locks available */,
  45. /*
  46. * This error code is special: arch syscall entry code will return
  47. * -ENOSYS if users try to call a syscall that doesn't exist. To keep
  48. * failures of syscalls that really do exist distinguishable from
  49. * failures due to attempts to use a nonexistent syscall, syscall
  50. * implementations should refrain from returning -ENOSYS.
  51. */
  52. ENOSYS = 38 /* Invalid system call number */,
  53. ENOTEMPTY = 39 /* Directory not empty */,
  54. ELOOP = 40 /* Too many symbolic links encountered */,
  55. EWOULDBLOCK = EAGAIN /* Operation would block */,
  56. ENOMSG = 42 /* No message of desired type */,
  57. EIDRM = 43 /* Identifier removed */,
  58. ECHRNG = 44 /* Channel number out of range */,
  59. EL2NSYNC = 45 /* Level 2 not synchronized */,
  60. EL3HLT = 46 /* Level 3 halted */,
  61. EL3RST = 47 /* Level 3 reset */,
  62. ELNRNG = 48 /* Link number out of range */,
  63. EUNATCH = 49 /* Protocol driver not attached */,
  64. ENOCSI = 50 /* No CSI structure available */,
  65. EL2HLT = 51 /* Level 2 halted */,
  66. EBADE = 52 /* Invalid exchange */,
  67. EBADR = 53 /* Invalid request descriptor */,
  68. EXFULL = 54 /* Exchange full */,
  69. ENOANO = 55 /* No anode */,
  70. EBADRQC = 56 /* Invalid request code */,
  71. EBADSLT = 57 /* Invalid slot */,
  72. EDEADLOCK = EDEADLK,
  73. EBFONT = 59 /* Bad font file format */,
  74. ENOSTR = 60 /* Device not a stream */,
  75. ENODATA = 61 /* No data available */,
  76. ETIME = 62 /* Timer expired */,
  77. ENOSR = 63 /* Out of streams resources */,
  78. ENONET = 64 /* Machine is not on the network */,
  79. ENOPKG = 65 /* Package not installed */,
  80. EREMOTE = 66 /* Object is remote */,
  81. ENOLINK = 67 /* Link has been severed */,
  82. EADV = 68 /* Advertise error */,
  83. ESRMNT = 69 /* Srmount error */,
  84. ECOMM = 70 /* Communication error on send */,
  85. EPROTO = 71 /* Protocol error */,
  86. EMULTIHOP = 72 /* Multihop attempted */,
  87. EDOTDOT = 73 /* RFS specific error */,
  88. EBADMSG = 74 /* Not a data message */,
  89. EOVERFLOW = 75 /* Value too large for defined data type */,
  90. ENOTUNIQ = 76 /* Name not unique on network */,
  91. EBADFD = 77 /* File descriptor in bad state */,
  92. EREMCHG = 78 /* Remote address changed */,
  93. ELIBACC = 79 /* Can not access a needed shared library */,
  94. ELIBBAD = 80 /* Accessing a corrupted shared library */,
  95. ELIBSCN = 81 /* .lib section in a.out corrupted */,
  96. ELIBMAX = 82 /* Attempting to link in too many shared libraries */,
  97. ELIBEXEC = 83 /* Cannot exec a shared library directly */,
  98. EILSEQ = 84 /* Illegal byte sequence */,
  99. ERESTART = 85 /* Interrupted system call should be restarted */,
  100. ESTRPIPE = 86 /* Streams pipe error */,
  101. EUSERS = 87 /* Too many users */,
  102. ENOTSOCK = 88 /* Socket operation on non-socket */,
  103. EDESTADDRREQ = 89 /* Destination address required */,
  104. EMSGSIZE = 90 /* Message too long */,
  105. EPROTOTYPE = 91 /* Protocol wrong type for socket */,
  106. ENOPROTOOPT = 92 /* Protocol not available */,
  107. EPROTONOSUPPORT = 93 /* Protocol not supported */,
  108. ESOCKTNOSUPPORT = 94 /* Socket type not supported */,
  109. EOPNOTSUPP = 95 /* Operation not supported on transport endpoint */,
  110. EPFNOSUPPORT = 96 /* Protocol family not supported */,
  111. EAFNOSUPPORT = 97 /* Address family not supported by protocol */,
  112. EADDRINUSE = 98 /* Address already in use */,
  113. EADDRNOTAVAIL = 99 /* Cannot assign requested address */,
  114. ENETDOWN = 100 /* Network is down */,
  115. ENETUNREACH = 101 /* Network is unreachable */,
  116. ENETRESET = 102 /* Network dropped connection because of reset */,
  117. ECONNABORTED = 103 /* Software caused connection abort */,
  118. ECONNRESET = 104 /* Connection reset by peer */,
  119. ENOBUFS = 105 /* No buffer space available */,
  120. EISCONN = 106 /* Transport endpoint is already connected */,
  121. ENOTCONN = 107 /* Transport endpoint is not connected */,
  122. ESHUTDOWN = 108 /* Cannot send after transport endpoint shutdown */,
  123. ETOOMANYREFS = 109 /* Too many references: cannot splice */,
  124. ETIMEDOUT = 110 /* Connection timed out */,
  125. ECONNREFUSED = 111 /* Connection refused */,
  126. EHOSTDOWN = 112 /* Host is down */,
  127. EHOSTUNREACH = 113 /* No route to host */,
  128. EALREADY = 114 /* Operation already in progress */,
  129. EINPROGRESS = 115 /* Operation now in progress */,
  130. ESTALE = 116 /* Stale file handle */,
  131. EUCLEAN = 117 /* Structure needs cleaning */,
  132. ENOTNAM = 118 /* Not a XENIX named type file */,
  133. ENAVAIL = 119 /* No XENIX semaphores available */,
  134. EISNAM = 120 /* Is a named type file */,
  135. EREMOTEIO = 121 /* Remote I/O error */,
  136. EDQUOT = 122 /* Quota exceeded */,
  137. ENOMEDIUM = 123 /* No medium found */,
  138. EMEDIUMTYPE = 124 /* Wrong medium type */,
  139. ECANCELED = 125 /* Operation Canceled */,
  140. ENOKEY = 126 /* Required key not available */,
  141. EKEYEXPIRED = 127 /* Key has expired */,
  142. EKEYREVOKED = 128 /* Key has been revoked */,
  143. EKEYREJECTED = 129 /* Key was rejected by service */,
  144. /* for robust mutexes */
  145. EOWNERDEAD = 130 /* Owner died */,
  146. ENOTRECOVERABLE = 131 /* State not recoverable */,
  147. ERFKILL = 132 /* Operation not possible due to RF-kill */,
  148. EHWPOISON = 133 /* Memory page has hardware error */
  149. }
  150. }