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.

errno.h 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  1. #ifndef ERRNO_H
  2. #define ERRNO_H
  3. FILE_LICENCE ( GPL2_OR_LATER );
  4. /** @file
  5. *
  6. * Error codes
  7. *
  8. * Return status codes as used within gPXE are designed to allow for
  9. * maximum visibility into the source of an error even in an end-user
  10. * build with no debugging. They are constructed as follows:
  11. *
  12. * Bits 7-0 : PXE error code
  13. *
  14. * This is the closest equivalent PXE error code
  15. * (e.g. PXENV_STATUS_OUT_OF_RESOURCES), and is the only part of the
  16. * error that will be returned via the PXE API, since PXE has
  17. * predefined error codes.
  18. *
  19. * Bits 12-8 : Per-file disambiguator
  20. *
  21. * When the same error number can be generated from multiple points
  22. * within a file, this field can be used to identify the unique
  23. * instance.
  24. *
  25. * Bits 23-13 : File identifier
  26. *
  27. * This is a unique identifier for the file generating the error
  28. * (e.g. ERRFILE_tcp for tcp.c).
  29. *
  30. * Bits 30-24 : POSIX error code
  31. *
  32. * This is the closest equivalent POSIX error code (e.g. ENOMEM).
  33. *
  34. * Bit 31 : Reserved
  35. *
  36. * Errors are usually return as negative error numbers (e.g. -EINVAL);
  37. * bit 31 is therefore unusable.
  38. *
  39. *
  40. * The convention within the code is that errors are negative and
  41. * expressed using the POSIX error code and (optionally) a per-file
  42. * disambiguator, e.g.
  43. *
  44. * return -EINVAL;
  45. *
  46. * or
  47. *
  48. * #define ETCP_BAD_CHECKSUM EUNIQ_02
  49. * return -( EINVAL | ETCP_BAD_CHECKSUM )
  50. *
  51. * By various bits of preprocessor magic, the PXE error code and file
  52. * identifier are already incorporated into the definition of the
  53. * POSIX error code, which keeps the code relatively clean.
  54. *
  55. *
  56. * Functions that wish to return failures should be declared as
  57. * returning an integer @c rc "Return status code". A return value of
  58. * zero indicates success, a non-zero value indicates failure. The
  59. * return value can be passed directly to strerror() in order to
  60. * generate a human-readable error message, e.g.
  61. *
  62. * if ( ( rc = some_function ( ... ) ) != 0 ) {
  63. * DBG ( "Whatever I was trying to do failed: %s\n", strerror ( rc ) );
  64. * return rc;
  65. * }
  66. *
  67. * As illustrated in the above example, error returns should generally
  68. * be directly propagated upward to the calling function.
  69. *
  70. */
  71. /* Get definitions for file identifiers */
  72. #include <gpxe/errfile.h>
  73. /* If we do not have a valid file identifier, generate a compiler
  74. * warning upon usage of any error codes. (Don't just use a #warning,
  75. * because some files include errno.h but don't ever actually use any
  76. * error codes.)
  77. */
  78. #if ! ERRFILE
  79. extern char missing_errfile_declaration[] __attribute__ (( deprecated ));
  80. #undef ERRFILE
  81. #define ERRFILE ( 0 * ( ( int ) missing_errfile_declaration ) )
  82. #endif
  83. /** Derive PXENV_STATUS code from gPXE error number */
  84. #define PXENV_STATUS( rc ) ( (-(rc)) & 0x00ff )
  85. /**
  86. * @defgroup pxeerrors PXE error codes
  87. *
  88. * The names, meanings and values of these error codes are defined by
  89. * the PXE specification.
  90. *
  91. * @{
  92. */
  93. /* Generic errors */
  94. #define PXENV_STATUS_SUCCESS 0x0000
  95. #define PXENV_STATUS_FAILURE 0x0001
  96. #define PXENV_STATUS_BAD_FUNC 0x0002
  97. #define PXENV_STATUS_UNSUPPORTED 0x0003
  98. #define PXENV_STATUS_KEEP_UNDI 0x0004
  99. #define PXENV_STATUS_KEEP_ALL 0x0005
  100. #define PXENV_STATUS_OUT_OF_RESOURCES 0x0006
  101. /* ARP errors (0x0010 to 0x001f) */
  102. #define PXENV_STATUS_ARP_TIMEOUT 0x0011
  103. /* Base-Code state errors */
  104. #define PXENV_STATUS_UDP_CLOSED 0x0018
  105. #define PXENV_STATUS_UDP_OPEN 0x0019
  106. #define PXENV_STATUS_TFTP_CLOSED 0x001a
  107. #define PXENV_STATUS_TFTP_OPEN 0x001b
  108. /* BIOS/system errors (0x0020 to 0x002f) */
  109. #define PXENV_STATUS_MCOPY_PROBLEM 0x0020
  110. #define PXENV_STATUS_BIS_INTEGRITY_FAILURE 0x0021
  111. #define PXENV_STATUS_BIS_VALIDATE_FAILURE 0x0022
  112. #define PXENV_STATUS_BIS_INIT_FAILURE 0x0023
  113. #define PXENV_STATUS_BIS_SHUTDOWN_FAILURE 0x0024
  114. #define PXENV_STATUS_BIS_GBOA_FAILURE 0x0025
  115. #define PXENV_STATUS_BIS_FREE_FAILURE 0x0026
  116. #define PXENV_STATUS_BIS_GSI_FAILURE 0x0027
  117. #define PXENV_STATUS_BIS_BAD_CKSUM 0x0028
  118. /* TFTP/MTFTP errors (0x0030 to 0x003f) */
  119. #define PXENV_STATUS_TFTP_CANNOT_ARP_ADDRESS 0x0030
  120. #define PXENV_STATUS_TFTP_OPEN_TIMEOUT 0x0032
  121. #define PXENV_STATUS_TFTP_UNKNOWN_OPCODE 0x0033
  122. #define PXENV_STATUS_TFTP_READ_TIMEOUT 0x0035
  123. #define PXENV_STATUS_TFTP_ERROR_OPCODE 0x0036
  124. #define PXENV_STATUS_TFTP_CANNOT_OPEN_CONNECTION 0x0038
  125. #define PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION 0x0039
  126. #define PXENV_STATUS_TFTP_TOO_MANY_PACKAGES 0x003a
  127. #define PXENV_STATUS_TFTP_FILE_NOT_FOUND 0x003b
  128. #define PXENV_STATUS_TFTP_ACCESS_VIOLATION 0x003c
  129. #define PXENV_STATUS_TFTP_NO_MCAST_ADDRESS 0x003d
  130. #define PXENV_STATUS_TFTP_NO_FILESIZE 0x003e
  131. #define PXENV_STATUS_TFTP_INVALID_PACKET_SIZE 0x003f
  132. /* Reserved errors 0x0040 to 0x004f) */
  133. /* DHCP/BOOTP errors (0x0050 to 0x005f) */
  134. #define PXENV_STATUS_DHCP_TIMEOUT 0x0051
  135. #define PXENV_STATUS_DHCP_NO_IP_ADDRESS 0x0052
  136. #define PXENV_STATUS_DHCP_NO_BOOTFILE_NAME 0x0053
  137. #define PXENV_STATUS_DHCP_BAD_IP_ADDRESS 0x0054
  138. /* Driver errors (0x0060 to 0x006f) */
  139. #define PXENV_STATUS_UNDI_INVALID_FUNCTION 0x0060
  140. #define PXENV_STATUS_UNDI_MEDIATEST_FAILED 0x0061
  141. #define PXENV_STATUS_UNDI_CANNOT_INIT_NIC_FOR_MCAST 0x0062
  142. #define PXENV_STATUS_UNDI_CANNOT_INITIALIZE_NIC 0x0063
  143. #define PXENV_STATUS_UNDI_CANNOT_INITIALIZE_PHY 0x0064
  144. #define PXENV_STATUS_UNDI_CANNOT_READ_CONFIG_DATA 0x0065
  145. #define PXENV_STATUS_UNDI_CANNOT_READ_INIT_DATA 0x0066
  146. #define PXENV_STATUS_UNDI_BAD_MAC_ADDRESS 0x0067
  147. #define PXENV_STATUS_UNDI_BAD_EEPROM_CHECKSUM 0x0068
  148. #define PXENV_STATUS_UNDI_ERROR_SETTING_ISR 0x0069
  149. #define PXENV_STATUS_UNDI_INVALID_STATE 0x006a
  150. #define PXENV_STATUS_UNDI_TRANSMIT_ERROR 0x006b
  151. #define PXENV_STATUS_UNDI_INVALID_PARAMETER 0x006c
  152. /* ROM and NBP bootstrap errors (0x0070 to 0x007f) */
  153. #define PXENV_STATUS_BSTRAP_PROMPT_MENU 0x0074
  154. #define PXENV_STATUS_BSTRAP_MCAST_ADDR 0x0076
  155. #define PXENV_STATUS_BSTRAP_MISSING_LIST 0x0077
  156. #define PXENV_STATUS_BSTRAP_NO_RESPONSE 0x0078
  157. #define PXENV_STATUS_BSTRAP_FILE_TOO_BIG 0x0079
  158. /* Environment NBP errors (0x0080 to 0x008f) */
  159. /* Reserved errors (0x0090 to 0x009f) */
  160. /* Miscellaneous errors (0x00a0 to 0x00af) */
  161. #define PXENV_STATUS_BINL_CANCELED_BY_KEYSTROKE 0x00a0
  162. #define PXENV_STATUS_BINL_NO_PXE_SERVER 0x00a1
  163. #define PXENV_STATUS_NOT_AVAILABLE_IN_PMODE 0x00a2
  164. #define PXENV_STATUS_NOT_AVAILABLE_IN_RMODE 0x00a3
  165. /* BUSD errors (0x00b0 to 0x00bf) */
  166. #define PXENV_STATUS_BUSD_DEVICE_NOT_SUPPORTED 0x00b0
  167. /* Loader errors (0x00c0 to 0x00cf) */
  168. #define PXENV_STATUS_LOADER_NO_FREE_BASE_MEMORY 0x00c0
  169. #define PXENV_STATUS_LOADER_NO_BC_ROMID 0x00c1
  170. #define PXENV_STATUS_LOADER_BAD_BC_ROMID 0x00c2
  171. #define PXENV_STATUS_LOADER_BAD_BC_RUNTIME_IMAGE 0x00c3
  172. #define PXENV_STATUS_LOADER_NO_UNDI_ROMID 0x00c4
  173. #define PXENV_STATUS_LOADER_BAD_UNDI_ROMID 0x00c5
  174. #define PXENV_STATUS_LOADER_BAD_UNDI_DRIVER_IMAGE 0x00c6
  175. #define PXENV_STATUS_LOADER_NO_PXE_STRUCT 0x00c8
  176. #define PXENV_STATUS_LOADER_NO_PXENV_STRUCT 0x00c9
  177. #define PXENV_STATUS_LOADER_UNDI_START 0x00ca
  178. #define PXENV_STATUS_LOADER_BC_START 0x00cb
  179. /** @} */
  180. /**
  181. * @defgroup posixerrors POSIX error codes
  182. *
  183. * The names and meanings (but not the values) of these error codes
  184. * are defined by POSIX. We choose to assign unique values which
  185. * incorporate the closest equivalent PXE error code, so that code may
  186. * simply use ENOMEM, rather than having to use the cumbersome
  187. * (ENOMEM|PXENV_STATUS_OUT_OF_RESOURCES).
  188. *
  189. * @{
  190. */
  191. /** Operation completed successfully */
  192. #define ENOERR ( ERRFILE | PXENV_STATUS_SUCCESS | 0x00000000 )
  193. /** Arg list too long */
  194. #define E2BIG ( ERRFILE | PXENV_STATUS_BAD_FUNC | 0x01000000 )
  195. /** Permission denied */
  196. #define EACCES ( ERRFILE | PXENV_STATUS_TFTP_ACCESS_VIOLATION | 0x02000000 )
  197. /** Address in use */
  198. #define EADDRINUSE ( ERRFILE | PXENV_STATUS_UDP_OPEN | 0x03000000 )
  199. /** Address not available */
  200. #define EADDRNOTAVAIL ( ERRFILE | PXENV_STATUS_UDP_OPEN | 0x04000000 )
  201. /** Address family not supported */
  202. #define EAFNOSUPPORT ( ERRFILE | PXENV_STATUS_UNSUPPORTED | 0x05000000 )
  203. /** Resource temporarily unavailable */
  204. #define EAGAIN ( ERRFILE | PXENV_STATUS_FAILURE | 0x06000000 )
  205. /** Connection already in progress */
  206. #define EALREADY ( ERRFILE | PXENV_STATUS_UDP_OPEN | 0x07000000 )
  207. /** Bad file descriptor */
  208. #define EBADF ( ERRFILE | PXENV_STATUS_TFTP_CLOSED | 0x08000000 )
  209. /** Bad message */
  210. #define EBADMSG ( ERRFILE | PXENV_STATUS_FAILURE | 0x09000000 )
  211. /** Resource busy */
  212. #define EBUSY ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x0a000000 )
  213. /** Operation canceled */
  214. #define ECANCELED \
  215. ( ERRFILE | PXENV_STATUS_BINL_CANCELED_BY_KEYSTROKE | 0x0b000000 )
  216. /** No child processes */
  217. #define ECHILD ( ERRFILE | PXENV_STATUS_TFTP_FILE_NOT_FOUND | 0x0c000000 )
  218. /** Connection aborted */
  219. #define ECONNABORTED \
  220. ( ERRFILE | PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION | 0x0d000000 )
  221. /** Connection refused */
  222. #define ECONNREFUSED \
  223. ( ERRFILE | PXENV_STATUS_TFTP_CANNOT_OPEN_CONNECTION | 0x0e000000 )
  224. /** Connection reset */
  225. #define ECONNRESET \
  226. ( ERRFILE | PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION | 0x0f000000 )
  227. /** Resource deadlock avoided */
  228. #define EDEADLK ( ERRFILE | PXENV_STATUS_FAILURE | 0x10000000 )
  229. /** Destination address required */
  230. #define EDESTADDRREQ ( ERRFILE | PXENV_STATUS_BAD_FUNC | 0x11000000 )
  231. /** Domain error */
  232. #define EDOM ( ERRFILE | PXENV_STATUS_FAILURE | 0x12000000 )
  233. /** Reserved */
  234. #define EDQUOT ( ERRFILE | PXENV_STATUS_FAILURE | 0x13000000 )
  235. /** File exists */
  236. #define EEXIST ( ERRFILE | PXENV_STATUS_FAILURE | 0x14000000 )
  237. /** Bad address */
  238. #define EFAULT ( ERRFILE | PXENV_STATUS_MCOPY_PROBLEM | 0x15000000 )
  239. /** File too large */
  240. #define EFBIG ( ERRFILE | PXENV_STATUS_MCOPY_PROBLEM | 0x16000000 )
  241. /** Host is unreachable */
  242. #define EHOSTUNREACH ( ERRFILE | PXENV_STATUS_ARP_TIMEOUT | 0x17000000 )
  243. /** Identifier removed */
  244. #define EIDRM ( ERRFILE | PXENV_STATUS_FAILURE | 0x18000000 )
  245. /** Illegal byte sequence */
  246. #define EILSEQ ( ERRFILE | PXENV_STATUS_FAILURE | 0x19000000 )
  247. /** Operation in progress */
  248. #define EINPROGRESS ( ERRFILE | PXENV_STATUS_FAILURE | 0x1a000000 )
  249. /** Interrupted function call */
  250. #define EINTR ( ERRFILE | PXENV_STATUS_FAILURE | 0x1b000000 )
  251. /** Invalid argument */
  252. #define EINVAL ( ERRFILE | PXENV_STATUS_BAD_FUNC | 0x1c000000 )
  253. /** Input/output error */
  254. #define EIO \
  255. ( ERRFILE | PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION | 0x1d000000 )
  256. /** Socket is connected */
  257. #define EISCONN ( ERRFILE | PXENV_STATUS_UDP_OPEN | 0x1e000000 )
  258. /** Is a directory */
  259. #define EISDIR ( ERRFILE | PXENV_STATUS_FAILURE | 0x1f000000 )
  260. /** Too many levels of symbolic links */
  261. #define ELOOP ( ERRFILE | PXENV_STATUS_FAILURE | 0x20000000 )
  262. /** Too many open files */
  263. #define EMFILE ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x21000000 )
  264. /** Too many links */
  265. #define EMLINK ( ERRFILE | PXENV_STATUS_FAILURE | 0x22000000 )
  266. /** Inappropriate message buffer length */
  267. #define EMSGSIZE ( ERRFILE | PXENV_STATUS_BAD_FUNC | 0x23000000 )
  268. /** Reserved */
  269. #define EMULTIHOP ( ERRFILE | PXENV_STATUS_FAILURE | 0x24000000 )
  270. /** Filename too long */
  271. #define ENAMETOOLONG ( ERRFILE | PXENV_STATUS_FAILURE | 0x25000000 )
  272. /** Network is down */
  273. #define ENETDOWN ( ERRFILE | PXENV_STATUS_ARP_TIMEOUT | 0x26000000 )
  274. /** Connection aborted by network */
  275. #define ENETRESET ( ERRFILE | PXENV_STATUS_FAILURE | 0x27000000 )
  276. /** Network unreachable */
  277. #define ENETUNREACH ( ERRFILE | PXENV_STATUS_ARP_TIMEOUT | 0x28000000 )
  278. /** Too many open files in system */
  279. #define ENFILE ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x29000000 )
  280. /** No buffer space available */
  281. #define ENOBUFS ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x2a000000 )
  282. /** No message is available on the STREAM head read queue */
  283. #define ENODATA ( ERRFILE | PXENV_STATUS_FAILURE | 0x2b000000 )
  284. /** No such device */
  285. #define ENODEV ( ERRFILE | PXENV_STATUS_TFTP_FILE_NOT_FOUND | 0x2c000000 )
  286. /** No such file or directory */
  287. #define ENOENT ( ERRFILE | PXENV_STATUS_TFTP_FILE_NOT_FOUND | 0x2d000000 )
  288. /** Exec format error */
  289. #define ENOEXEC ( ERRFILE | PXENV_STATUS_FAILURE | 0x2e000000 )
  290. /** No locks available */
  291. #define ENOLCK ( ERRFILE | PXENV_STATUS_FAILURE | 0x2f000000 )
  292. /** Reserved */
  293. #define ENOLINK ( ERRFILE | PXENV_STATUS_FAILURE | 0x30000000 )
  294. /** Not enough space */
  295. #define ENOMEM ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x31000000 )
  296. /** No message of the desired type */
  297. #define ENOMSG ( ERRFILE | PXENV_STATUS_FAILURE | 0x32000000 )
  298. /** Protocol not available */
  299. #define ENOPROTOOPT ( ERRFILE | PXENV_STATUS_UNSUPPORTED | 0x33000000 )
  300. /** No space left on device */
  301. #define ENOSPC ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x34000000 )
  302. /** No STREAM resources */
  303. #define ENOSR ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x35000000 )
  304. /** Not a STREAM */
  305. #define ENOSTR ( ERRFILE | PXENV_STATUS_FAILURE | 0x36000000 )
  306. /** Function not implemented */
  307. #define ENOSYS ( ERRFILE | PXENV_STATUS_UNSUPPORTED | 0x37000000 )
  308. /** The socket is not connected */
  309. #define ENOTCONN ( ERRFILE | PXENV_STATUS_FAILURE | 0x38000000 )
  310. /** Not a directory */
  311. #define ENOTDIR ( ERRFILE | PXENV_STATUS_FAILURE | 0x39000000 )
  312. /** Directory not empty */
  313. #define ENOTEMPTY ( ERRFILE | PXENV_STATUS_FAILURE | 0x3a000000 )
  314. /** Not a socket */
  315. #define ENOTSOCK ( ERRFILE | PXENV_STATUS_FAILURE | 0x3b000000 )
  316. /** Not supported */
  317. #define ENOTSUP ( ERRFILE | PXENV_STATUS_UNSUPPORTED | 0x3c000000 )
  318. /** Inappropriate I/O control operation */
  319. #define ENOTTY ( ERRFILE | PXENV_STATUS_FAILURE | 0x3d000000 )
  320. /** No such device or address */
  321. #define ENXIO ( ERRFILE | PXENV_STATUS_TFTP_FILE_NOT_FOUND | 0x3e000000 )
  322. /** Operation not supported on socket */
  323. #define EOPNOTSUPP ( ERRFILE | PXENV_STATUS_UNSUPPORTED | 0x3f000000 )
  324. /** Value too large to be stored in data type */
  325. #define EOVERFLOW ( ERRFILE | PXENV_STATUS_FAILURE | 0x40000000 )
  326. /** Operation not permitted */
  327. #define EPERM ( ERRFILE | PXENV_STATUS_TFTP_ACCESS_VIOLATION | 0x41000000 )
  328. /** Broken pipe */
  329. #define EPIPE ( ERRFILE | PXENV_STATUS_FAILURE | 0x42000000 )
  330. /** Protocol error */
  331. #define EPROTO ( ERRFILE | PXENV_STATUS_FAILURE | 0x43000000 )
  332. /** Protocol not supported */
  333. #define EPROTONOSUPPORT ( ERRFILE | PXENV_STATUS_UNSUPPORTED | 0x44000000 )
  334. /** Protocol wrong type for socket */
  335. #define EPROTOTYPE ( ERRFILE | PXENV_STATUS_FAILURE | 0x45000000 )
  336. /** Result too large */
  337. #define ERANGE ( ERRFILE | PXENV_STATUS_FAILURE | 0x46000000 )
  338. /** Read-only file system */
  339. #define EROFS ( ERRFILE | PXENV_STATUS_FAILURE | 0x47000000 )
  340. /** Invalid seek */
  341. #define ESPIPE ( ERRFILE | PXENV_STATUS_FAILURE | 0x48000000 )
  342. /** No such process */
  343. #define ESRCH ( ERRFILE | PXENV_STATUS_TFTP_FILE_NOT_FOUND | 0x49000000 )
  344. /** Stale file handle */
  345. #define ESTALE ( ERRFILE | PXENV_STATUS_FAILURE | 0x4a000000 )
  346. /** STREAM ioctl() timeout */
  347. #define ETIME ( ERRFILE | PXENV_STATUS_FAILURE | 0x4b000000 )
  348. /** Operation timed out */
  349. #define ETIMEDOUT ( ERRFILE | PXENV_STATUS_TFTP_READ_TIMEOUT | 0x4c000000 )
  350. /** Text file busy */
  351. #define ETXTBSY ( ERRFILE | PXENV_STATUS_FAILURE | 0x4d000000 )
  352. /** Operation would block (different from EAGAIN!) */
  353. #define EWOULDBLOCK ( ERRFILE | PXENV_STATUS_TFTP_OPEN | 0x4e000000 )
  354. /** Improper link */
  355. #define EXDEV ( ERRFILE | PXENV_STATUS_FAILURE | 0x4f000000 )
  356. /** @} */
  357. /**
  358. * @defgroup euniq Per-file error disambiguators
  359. *
  360. * Files which use the same error number multiple times should
  361. * probably define their own error subspace using these
  362. * disambiguators. For example:
  363. *
  364. * #define ETCP_HEADER_TOO_SHORT EUNIQ_01
  365. * #define ETCP_BAD_CHECKSUM EUNIQ_02
  366. *
  367. * @{
  368. */
  369. #define EUNIQ_01 0x00000100
  370. #define EUNIQ_02 0x00000200
  371. #define EUNIQ_03 0x00000300
  372. #define EUNIQ_04 0x00000400
  373. #define EUNIQ_05 0x00000500
  374. #define EUNIQ_06 0x00000600
  375. #define EUNIQ_07 0x00000700
  376. #define EUNIQ_08 0x00000800
  377. #define EUNIQ_09 0x00000900
  378. #define EUNIQ_0A 0x00000a00
  379. #define EUNIQ_0B 0x00000b00
  380. #define EUNIQ_0C 0x00000c00
  381. #define EUNIQ_0D 0x00000d00
  382. #define EUNIQ_0E 0x00000e00
  383. #define EUNIQ_0F 0x00000f00
  384. #define EUNIQ_10 0x00001000
  385. #define EUNIQ_11 0x00001100
  386. #define EUNIQ_12 0x00001200
  387. #define EUNIQ_13 0x00001300
  388. #define EUNIQ_14 0x00001400
  389. #define EUNIQ_15 0x00001500
  390. #define EUNIQ_16 0x00001600
  391. #define EUNIQ_17 0x00001700
  392. #define EUNIQ_18 0x00001800
  393. #define EUNIQ_19 0x00001900
  394. #define EUNIQ_1A 0x00001a00
  395. #define EUNIQ_1B 0x00001b00
  396. #define EUNIQ_1C 0x00001c00
  397. #define EUNIQ_1D 0x00001d00
  398. #define EUNIQ_1E 0x00001e00
  399. #define EUNIQ_1F 0x00001f00
  400. /** @} */
  401. extern int errno;
  402. #endif /* ERRNO_H */