canopen_errno.h 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. /*
  2. * Copyright (c) 1982, 1986, 1993
  3. * The Regents of the University of California. All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. * 1. Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * 2. Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. * 3. Neither the name of the University nor the names of its contributors
  14. * may be used to endorse or promote products derived from this software
  15. * without specific prior written permission.
  16. *
  17. * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  18. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20. * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  21. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  23. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  24. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  25. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  26. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  27. * SUCH DAMAGE.
  28. *
  29. * errno is not a global variable, because that would make using it
  30. * non-reentrant. Instead, its address is returned by the function
  31. * __errno.
  32. */
  33. #ifndef _SYS_ERRNO_H_
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37. #define _SYS_ERRNO_H_
  38. #define __errno_r(ptr) (errno)
  39. #define _REENT_ERRNO(r) (errno)
  40. #define EPERM 1 /* Not owner */
  41. #define ENOENT 2 /* No such file or directory */
  42. #define ESRCH 3 /* No such process */
  43. #define EINTR 4 /* Interrupted system call */
  44. #define EIO 5 /* I/O error */
  45. #define ENXIO 6 /* No such device or address */
  46. #define E2BIG 7 /* Arg list too long */
  47. #define ENOEXEC 8 /* Exec format error */
  48. #define EBADF 9 /* Bad file number */
  49. #define ECHILD 10 /* No children */
  50. #define EAGAIN 11 /* No more processes */
  51. #define ENOMEM 12 /* Not enough space */
  52. #define EACCES 13 /* Permission denied */
  53. #define EFAULT 14 /* Bad address */
  54. #ifdef __LINUX_ERRNO_EXTENSIONS__
  55. #define ENOTBLK 15 /* Block device required */
  56. #endif
  57. #define EBUSY 16 /* Device or resource busy */
  58. #define EEXIST 17 /* File exists */
  59. #define EXDEV 18 /* Cross-device link */
  60. #define ENODEV 19 /* No such device */
  61. #define ENOTDIR 20 /* Not a directory */
  62. #define EISDIR 21 /* Is a directory */
  63. #define EINVAL 22 /* Invalid argument */
  64. #define ENFILE 23 /* Too many open files in system */
  65. #define EMFILE 24 /* File descriptor value too large */
  66. #define ENOTTY 25 /* Not a character device */
  67. #define ETXTBSY 26 /* Text file busy */
  68. #define EFBIG 27 /* File too large */
  69. #define ENOSPC 28 /* No space left on device */
  70. #define ESPIPE 29 /* Illegal seek */
  71. #define EROFS 30 /* Read-only file system */
  72. #define EMLINK 31 /* Too many links */
  73. #define EPIPE 32 /* Broken pipe */
  74. #define EDOM 33 /* Mathematics argument out of domain of function */
  75. #define ERANGE 34 /* Result too large */
  76. #define ENOMSG 35 /* No message of desired type */
  77. #define EIDRM 36 /* Identifier removed */
  78. #ifdef __LINUX_ERRNO_EXTENSIONS__
  79. #define ECHRNG 37 /* Channel number out of range */
  80. #define EL2NSYNC 38 /* Level 2 not synchronized */
  81. #define EL3HLT 39 /* Level 3 halted */
  82. #define EL3RST 40 /* Level 3 reset */
  83. #define ELNRNG 41 /* Link number out of range */
  84. #define EUNATCH 42 /* Protocol driver not attached */
  85. #define ENOCSI 43 /* No CSI structure available */
  86. #define EL2HLT 44 /* Level 2 halted */
  87. #endif
  88. #define EDEADLK 45 /* Deadlock */
  89. #define ENOLCK 46 /* No lock */
  90. #ifdef __LINUX_ERRNO_EXTENSIONS__
  91. #define EBADE 50 /* Invalid exchange */
  92. #define EBADR 51 /* Invalid request descriptor */
  93. #define EXFULL 52 /* Exchange full */
  94. #define ENOANO 53 /* No anode */
  95. #define EBADRQC 54 /* Invalid request code */
  96. #define EBADSLT 55 /* Invalid slot */
  97. #define EDEADLOCK 56 /* File locking deadlock error */
  98. #define EBFONT 57 /* Bad font file fmt */
  99. #endif
  100. #define ENOSTR 60 /* Not a stream */
  101. #define ENODATA 61 /* No data (for no delay io) */
  102. #define ETIME 62 /* Stream ioctl timeout */
  103. #define ENOSR 63 /* No stream resources */
  104. #ifdef __LINUX_ERRNO_EXTENSIONS__
  105. #define ENONET 64 /* Machine is not on the network */
  106. #define ENOPKG 65 /* Package not installed */
  107. #define EREMOTE 66 /* The object is remote */
  108. #endif
  109. #define ENOLINK 67 /* Virtual circuit is gone */
  110. #ifdef __LINUX_ERRNO_EXTENSIONS__
  111. #define EADV 68 /* Advertise error */
  112. #define ESRMNT 69 /* Srmount error */
  113. #define ECOMM 70 /* Communication error on send */
  114. #endif
  115. #define EPROTO 71 /* Protocol error */
  116. #define EMULTIHOP 74 /* Multihop attempted */
  117. #ifdef __LINUX_ERRNO_EXTENSIONS__
  118. #define ELBIN 75 /* Inode is remote (not really error) */
  119. #define EDOTDOT 76 /* Cross mount point (not really error) */
  120. #endif
  121. #define EBADMSG 77 /* Bad message */
  122. #ifdef __LINUX_ERRNO_EXTENSIONS__
  123. #define EFTYPE 79 /* Inappropriate file type or format */
  124. #define ENOTUNIQ 80 /* Given log. name not unique */
  125. #define EBADFD 81 /* File descriptor in bad state */
  126. #define EREMCHG 82 /* Remote address changed */
  127. #define ELIBACC 83 /* Can't access a needed shared lib */
  128. #define ELIBBAD 84 /* Accessing a corrupted shared lib */
  129. #define ELIBSCN 85 /* .lib section in a.out corrupted */
  130. #define ELIBMAX 86 /* Attempting to link in too many libs */
  131. #define ELIBEXEC 87 /* Attempting to exec a shared library */
  132. #endif
  133. #ifdef __CYGWIN__
  134. #define ENMFILE 89 /* No more files */
  135. #endif
  136. #define ENOTEMPTY 90 /* Directory not empty */
  137. #define ENAMETOOLONG 91 /* File or path name too long */
  138. #define ELOOP 92 /* Too many symbolic links */
  139. #define EOPNOTSUPP 95 /* Operation not supported on socket */
  140. #ifdef __LINUX_ERRNO_EXTENSIONS__
  141. #define EPFNOSUPPORT 96 /* Protocol family not supported */
  142. #endif
  143. #define ECONNRESET 104 /* Connection reset by peer */
  144. #define ENOBUFS 105 /* No buffer space available */
  145. #define EAFNOSUPPORT 106 /* Address family not supported by protocol family */
  146. #define EPROTOTYPE 107 /* Protocol wrong type for socket */
  147. #define ENOTSOCK 108 /* Socket operation on non-socket */
  148. #define ENOPROTOOPT 109 /* Protocol not available */
  149. #ifdef __LINUX_ERRNO_EXTENSIONS__
  150. #define ESHUTDOWN 110 /* Can't send after socket shutdown */
  151. #endif
  152. #define ECONNREFUSED 111 /* Connection refused */
  153. #define EADDRINUSE 112 /* Address already in use */
  154. #define ECONNABORTED 113 /* Software caused connection abort */
  155. #define ENETUNREACH 114 /* Network is unreachable */
  156. #define ENETDOWN 115 /* Network interface is not configured */
  157. #define ETIMEDOUT 116 /* Connection timed out */
  158. #ifdef __LINUX_ERRNO_EXTENSIONS__
  159. #define EHOSTDOWN 117 /* Host is down */
  160. #endif
  161. #define EHOSTUNREACH 118 /* Host is unreachable */
  162. #define EINPROGRESS 119 /* Connection already in progress */
  163. #define EALREADY 120 /* Socket already connected */
  164. #define EDESTADDRREQ 121 /* Destination address required */
  165. #define EMSGSIZE 122 /* Message too long */
  166. #define EPROTONOSUPPORT 123 /* Unknown protocol */
  167. #ifdef __LINUX_ERRNO_EXTENSIONS__
  168. #define ESOCKTNOSUPPORT 124 /* Socket type not supported */
  169. #endif
  170. #define EADDRNOTAVAIL 125 /* Address not available */
  171. #define ENETRESET 126 /* Connection aborted by network */
  172. #define EISCONN 127 /* Socket is already connected */
  173. #define ENOTCONN 128 /* Socket is not connected */
  174. #ifdef __LINUX_ERRNO_EXTENSIONS__
  175. #define ETOOMANYREFS 129 /* Too many references: cannot splice */
  176. #define EPROCLIM 130 /* Too many processes */
  177. #define EUSERS 131 /* Too many users */
  178. #endif
  179. #define EDQUOT 132 /* Reserved */
  180. #define ESTALE 133 /* Reserved */
  181. #define ENOTSUP 134 /* Not supported */
  182. #ifdef __LINUX_ERRNO_EXTENSIONS__
  183. #define ENOMEDIUM 135 /* No medium found */
  184. #endif
  185. #ifdef __CYGWIN__
  186. #define ENOSHARE 136 /* No such host or network path */
  187. #define ECASECLASH 137 /* Filename exists with different case */
  188. #endif
  189. #define EOVERFLOW 139 /* Value too large for defined data type */
  190. #define ECANCELED 140 /* Operation canceled */
  191. #define ENOTRECOVERABLE 141 /* State not recoverable */
  192. #define EOWNERDEAD 142 /* Previous owner died */
  193. #ifdef __LINUX_ERRNO_EXTENSIONS__
  194. #define ESTRPIPE 143 /* Streams pipe error */
  195. #define EHWPOISON 144 /* Memory page has hardware error */
  196. #define EISNAM 145 /* Is a named type file */
  197. #define EKEYEXPIRED 146 /* Key has expired */
  198. #define EKEYREJECTED 147 /* Key was rejected by service */
  199. #define EKEYREVOKED 148 /* Key has been revoked */
  200. #endif
  201. #define EWOULDBLOCK EAGAIN /* Operation would block */
  202. #define __ELASTERROR 2000 /* Users can add values starting here */
  203. #ifdef __cplusplus
  204. }
  205. #endif
  206. #endif /* _SYS_ERRNO_H */