lib.rs 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. //! errno implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/errno.h.html
  2. #![no_std]
  3. extern crate platform;
  4. pub enum Errno {
  5. // Argument list too long
  6. E2BIG = 1,
  7. // Permission denied
  8. EACCES,
  9. // Address in use
  10. EADDRINUSE,
  11. // Address not available
  12. EADDRNOTAVAIL,
  13. // Address family not supported
  14. EAFNOSUPPORT,
  15. // Resource unavailable, try again (may be the same value as [EWOULDBLOCK])
  16. EAGAIN,
  17. // Connection already in progress
  18. EALREADY,
  19. // Bad file descriptor
  20. EBADF,
  21. // Bad message
  22. EBADMSG,
  23. // Device or resource busy
  24. EBUSY,
  25. // Operation canceled
  26. ECANCELED,
  27. // No child processes
  28. ECHILD,
  29. // Connection aborted
  30. ECONNABORTED,
  31. // Connection refused
  32. ECONNREFUSED,
  33. // Connection reset
  34. ECONNRESET,
  35. // Resource deadlock would occur
  36. EDEADLK,
  37. // Destination address required
  38. EDESTADDRREQ,
  39. // Mathematics argument out of domain of function
  40. EDOM,
  41. // Reserved
  42. EDQUOT,
  43. // File exists
  44. EEXIST,
  45. // Bad address
  46. EFAULT,
  47. // File too large
  48. EFBIG,
  49. // Host is unreachable
  50. EHOSTUNREACH,
  51. // Identifier removed
  52. EIDRM,
  53. // Illegal byte sequence
  54. EILSEQ,
  55. // Operation in progress
  56. EINPROGRESS,
  57. // Interrupted function
  58. EINTR,
  59. // Invalid argument
  60. EINVAL,
  61. // I/O error
  62. EIO,
  63. // Socket is connected
  64. EISCONN,
  65. // Is a directory
  66. EISDIR,
  67. // Too many levels of symbolic links
  68. ELOOP,
  69. // Too many open files
  70. EMFILE,
  71. // Too many links
  72. EMLINK,
  73. // Message too large
  74. EMSGSIZE,
  75. // Reserved
  76. EMULTIHOP,
  77. // Filename too long
  78. ENAMETOOLONG,
  79. // Network is down
  80. ENETDOWN,
  81. // Connection aborted by network
  82. ENETRESET,
  83. // Network unreachable
  84. ENETUNREACH,
  85. // Too many files open in system
  86. ENFILE,
  87. // No buffer space available
  88. ENOBUFS,
  89. // No message is available on the STREAM head read queue
  90. ENODATA,
  91. // No such device
  92. ENODEV,
  93. // No such file or directory
  94. ENOENT,
  95. // Executable file format error
  96. ENOEXEC,
  97. // No locks available
  98. ENOLCK,
  99. // Reserved
  100. ENOLINK,
  101. // Not enough space
  102. ENOMEM,
  103. // No message of the desired type
  104. ENOMSG,
  105. // Protocol not available
  106. ENOPROTOOPT,
  107. // No space left on device
  108. ENOSPC,
  109. // No STREAM resources
  110. ENOSR,
  111. // Not a STREAM
  112. ENOSTR,
  113. // Function not supported
  114. ENOSYS,
  115. // The socket is not connected
  116. ENOTCONN,
  117. // Not a directory
  118. ENOTDIR,
  119. // Directory not empty
  120. ENOTEMPTY,
  121. // Not a socket
  122. ENOTSOCK,
  123. // Not supported
  124. ENOTSUP,
  125. // Inappropriate I/O control operation
  126. ENOTTY,
  127. // No such device or address
  128. ENXIO,
  129. // Operation not supported on socket
  130. EOPNOTSUPP,
  131. // Value too large to be stored in data type
  132. EOVERFLOW,
  133. // Operation not permitted
  134. EPERM,
  135. // Broken pipe
  136. EPIPE,
  137. // Protocol error
  138. EPROTO,
  139. // Protocol not supported
  140. EPROTONOSUPPORT,
  141. // Protocol wrong type for socket
  142. EPROTOTYPE,
  143. // Result too large
  144. ERANGE,
  145. // Read-only file system
  146. EROFS,
  147. // Invalid seek
  148. ESPIPE,
  149. // No such process
  150. ESRCH,
  151. // Reserved
  152. ESTALE,
  153. // Stream ioctl() timeout
  154. ETIME,
  155. // Connection timed out
  156. ETIMEDOUT,
  157. // Text file busy
  158. ETXTBSY,
  159. // Operation would block (may be the same value as [EAGAIN])
  160. EWOULDBLOCK,
  161. // Cross-device link
  162. EXDEV,
  163. }