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.

linux.h 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. #ifndef _IPXE_ERRNO_LINUX_H
  2. #define _IPXE_ERRNO_LINUX_H
  3. /**
  4. * @file
  5. *
  6. * Linux platform error codes
  7. *
  8. * Linux error codes all fit inside 8 bits, so we just use them
  9. * directly as our platform error codes.
  10. */
  11. FILE_LICENCE ( GPL2_OR_LATER );
  12. /**
  13. * Convert platform error code to platform component of iPXE error code
  14. *
  15. * @v platform Platform error code
  16. * @ret errno Platform component of iPXE error code
  17. */
  18. #define PLATFORM_TO_ERRNO( platform ) ( (platform) & 0xff )
  19. /**
  20. * Convert iPXE error code to platform error code
  21. *
  22. * @v errno iPXE error code
  23. * @ret platform Platform error code
  24. */
  25. #define ERRNO_TO_PLATFORM( errno ) ( (errno) & 0xff )
  26. /* Platform-specific error codes */
  27. #define PLATFORM_ENOERR 0
  28. #define PLATFORM_E2BIG 7
  29. #define PLATFORM_EACCES 13
  30. #define PLATFORM_EADDRINUSE 98
  31. #define PLATFORM_EADDRNOTAVAIL 99
  32. #define PLATFORM_EAFNOSUPPORT 97
  33. #define PLATFORM_EAGAIN 11
  34. #define PLATFORM_EALREADY 114
  35. #define PLATFORM_EBADF 9
  36. #define PLATFORM_EBADMSG 74
  37. #define PLATFORM_EBUSY 16
  38. #define PLATFORM_ECANCELED 125
  39. #define PLATFORM_ECHILD 10
  40. #define PLATFORM_ECONNABORTED 103
  41. #define PLATFORM_ECONNREFUSED 111
  42. #define PLATFORM_ECONNRESET 104
  43. #define PLATFORM_EDEADLK 35
  44. #define PLATFORM_EDESTADDRREQ 89
  45. #define PLATFORM_EDOM 33
  46. #define PLATFORM_EDQUOT 122
  47. #define PLATFORM_EEXIST 17
  48. #define PLATFORM_EFAULT 14
  49. #define PLATFORM_EFBIG 27
  50. #define PLATFORM_EHOSTUNREACH 113
  51. #define PLATFORM_EIDRM 43
  52. #define PLATFORM_EILSEQ 84
  53. #define PLATFORM_EINPROGRESS 115
  54. #define PLATFORM_EINTR 4
  55. #define PLATFORM_EINVAL 22
  56. #define PLATFORM_EIO 5
  57. #define PLATFORM_EISCONN 106
  58. #define PLATFORM_EISDIR 21
  59. #define PLATFORM_ELOOP 40
  60. #define PLATFORM_EMFILE 24
  61. #define PLATFORM_EMLINK 31
  62. #define PLATFORM_EMSGSIZE 90
  63. #define PLATFORM_EMULTIHOP 72
  64. #define PLATFORM_ENAMETOOLONG 36
  65. #define PLATFORM_ENETDOWN 100
  66. #define PLATFORM_ENETRESET 102
  67. #define PLATFORM_ENETUNREACH 101
  68. #define PLATFORM_ENFILE 23
  69. #define PLATFORM_ENOBUFS 105
  70. #define PLATFORM_ENODATA 61
  71. #define PLATFORM_ENODEV 19
  72. #define PLATFORM_ENOENT 2
  73. #define PLATFORM_ENOEXEC 8
  74. #define PLATFORM_ENOLCK 37
  75. #define PLATFORM_ENOLINK 67
  76. #define PLATFORM_ENOMEM 12
  77. #define PLATFORM_ENOMSG 42
  78. #define PLATFORM_ENOPROTOOPT 92
  79. #define PLATFORM_ENOSPC 28
  80. #define PLATFORM_ENOSR 63
  81. #define PLATFORM_ENOSTR 60
  82. #define PLATFORM_ENOSYS 38
  83. #define PLATFORM_ENOTCONN 107
  84. #define PLATFORM_ENOTDIR 20
  85. #define PLATFORM_ENOTEMPTY 39
  86. #define PLATFORM_ENOTSOCK 88
  87. #define PLATFORM_ENOTSUP PLATFORM_EOPNOTSUPP
  88. #define PLATFORM_ENOTTY 25
  89. #define PLATFORM_ENXIO 6
  90. #define PLATFORM_EOPNOTSUPP 95
  91. #define PLATFORM_EOVERFLOW 75
  92. #define PLATFORM_EPERM 1
  93. #define PLATFORM_EPIPE 32
  94. #define PLATFORM_EPROTO 71
  95. #define PLATFORM_EPROTONOSUPPORT 93
  96. #define PLATFORM_EPROTOTYPE 91
  97. #define PLATFORM_ERANGE 34
  98. #define PLATFORM_EROFS 30
  99. #define PLATFORM_ESPIPE 29
  100. #define PLATFORM_ESRCH 3
  101. #define PLATFORM_ESTALE 116
  102. #define PLATFORM_ETIME 62
  103. #define PLATFORM_ETIMEDOUT 110
  104. #define PLATFORM_ETXTBSY 26
  105. #define PLATFORM_EWOULDBLOCK PLATFORM_EAGAIN
  106. #define PLATFORM_EXDEV 18
  107. #endif /* _IPXE_ERRNO_LINUX_H */