Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

errno.h 17KB

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