sys_errlist.c 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. /*
  2. * Copyright (C) 2002 Manuel Novoa III
  3. * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  4. *
  5. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. */
  7. #include <features.h>
  8. #include <errno.h>
  9. extern const char _string_syserrmsgs[] attribute_hidden;
  10. #ifdef __UCLIBC_HAS_SYS_ERRLIST__
  11. const char *const sys_errlist[] = {
  12. [0] = _string_syserrmsgs + 0,
  13. [EPERM] = _string_syserrmsgs + 8,
  14. [ENOENT] = _string_syserrmsgs + 32,
  15. [ESRCH] = _string_syserrmsgs + 58,
  16. [EINTR] = _string_syserrmsgs + 74,
  17. [EIO] = _string_syserrmsgs + 98,
  18. [ENXIO] = _string_syserrmsgs + 117,
  19. [E2BIG] = _string_syserrmsgs + 143,
  20. [ENOEXEC] = _string_syserrmsgs + 166,
  21. [EBADF] = _string_syserrmsgs + 184,
  22. [ECHILD] = _string_syserrmsgs + 204,
  23. [EAGAIN] = _string_syserrmsgs + 223,
  24. [ENOMEM] = _string_syserrmsgs + 256,
  25. [EACCES] = _string_syserrmsgs + 279,
  26. [EFAULT] = _string_syserrmsgs + 297,
  27. [ENOTBLK] = _string_syserrmsgs + 309,
  28. [EBUSY] = _string_syserrmsgs + 331,
  29. [EEXIST] = _string_syserrmsgs + 355,
  30. [EXDEV] = _string_syserrmsgs + 367,
  31. [ENODEV] = _string_syserrmsgs + 393,
  32. [ENOTDIR] = _string_syserrmsgs + 408,
  33. [EISDIR] = _string_syserrmsgs + 424,
  34. [EINVAL] = _string_syserrmsgs + 439,
  35. [ENFILE] = _string_syserrmsgs + 456,
  36. [EMFILE] = _string_syserrmsgs + 486,
  37. [ENOTTY] = _string_syserrmsgs + 506,
  38. [ETXTBSY] = _string_syserrmsgs + 537,
  39. [EFBIG] = _string_syserrmsgs + 552,
  40. [ENOSPC] = _string_syserrmsgs + 567,
  41. [ESPIPE] = _string_syserrmsgs + 591,
  42. [EROFS] = _string_syserrmsgs + 604,
  43. [EMLINK] = _string_syserrmsgs + 626,
  44. [EPIPE] = _string_syserrmsgs + 641,
  45. [EDOM] = _string_syserrmsgs + 653,
  46. [ERANGE] = _string_syserrmsgs + 686,
  47. [EDEADLK] = _string_syserrmsgs + 716,
  48. [ENAMETOOLONG] = _string_syserrmsgs + 742,
  49. [ENOLCK] = _string_syserrmsgs + 761,
  50. [ENOSYS] = _string_syserrmsgs + 780,
  51. [ENOTEMPTY] = _string_syserrmsgs + 805,
  52. [ELOOP] = _string_syserrmsgs + 825,
  53. /* _string_syserrmsgs + 859, */
  54. [ENOMSG] = _string_syserrmsgs + 860,
  55. [EIDRM] = _string_syserrmsgs + 887,
  56. [ECHRNG] = _string_syserrmsgs + 906,
  57. [EL2NSYNC] = _string_syserrmsgs + 934,
  58. [EL3HLT] = _string_syserrmsgs + 959,
  59. [EL3RST] = _string_syserrmsgs + 974,
  60. [ELNRNG] = _string_syserrmsgs + 988,
  61. [EUNATCH] = _string_syserrmsgs + 1013,
  62. [ENOCSI] = _string_syserrmsgs + 1042,
  63. [EL2HLT] = _string_syserrmsgs + 1069,
  64. [EBADE] = _string_syserrmsgs + 1084,
  65. [EBADR] = _string_syserrmsgs + 1101,
  66. [EXFULL] = _string_syserrmsgs + 1128,
  67. [ENOANO] = _string_syserrmsgs + 1142,
  68. [EBADRQC] = _string_syserrmsgs + 1151,
  69. [EBADSLT] = _string_syserrmsgs + 1172,
  70. /* _string_syserrmsgs + 1185, */
  71. [EBFONT] = _string_syserrmsgs + 1186,
  72. [ENOSTR] = _string_syserrmsgs + 1207,
  73. [ENODATA] = _string_syserrmsgs + 1227,
  74. [ETIME] = _string_syserrmsgs + 1245,
  75. [ENOSR] = _string_syserrmsgs + 1259,
  76. [ENONET] = _string_syserrmsgs + 1284,
  77. [ENOPKG] = _string_syserrmsgs + 1314,
  78. [EREMOTE] = _string_syserrmsgs + 1336,
  79. [ENOLINK] = _string_syserrmsgs + 1353,
  80. [EADV] = _string_syserrmsgs + 1375,
  81. [ESRMNT] = _string_syserrmsgs + 1391,
  82. [ECOMM] = _string_syserrmsgs + 1405,
  83. [EPROTO] = _string_syserrmsgs + 1433,
  84. [EMULTIHOP] = _string_syserrmsgs + 1448,
  85. [EDOTDOT] = _string_syserrmsgs + 1467,
  86. [EBADMSG] = _string_syserrmsgs + 1486,
  87. [EOVERFLOW] = _string_syserrmsgs + 1498,
  88. [ENOTUNIQ] = _string_syserrmsgs + 1536,
  89. [EBADFD] = _string_syserrmsgs + 1563,
  90. [EREMCHG] = _string_syserrmsgs + 1592,
  91. [ELIBACC] = _string_syserrmsgs + 1615,
  92. [ELIBBAD] = _string_syserrmsgs + 1654,
  93. [ELIBSCN] = _string_syserrmsgs + 1691,
  94. [ELIBMAX] = _string_syserrmsgs + 1723,
  95. [ELIBEXEC] = _string_syserrmsgs + 1771,
  96. [EILSEQ] = _string_syserrmsgs + 1809,
  97. [ERESTART] = _string_syserrmsgs + 1859,
  98. [ESTRPIPE] = _string_syserrmsgs + 1903,
  99. [EUSERS] = _string_syserrmsgs + 1922,
  100. [ENOTSOCK] = _string_syserrmsgs + 1937,
  101. [EDESTADDRREQ] = _string_syserrmsgs + 1968,
  102. [EMSGSIZE] = _string_syserrmsgs + 1997,
  103. [EPROTOTYPE] = _string_syserrmsgs + 2014,
  104. [ENOPROTOOPT] = _string_syserrmsgs + 2045,
  105. [EPROTONOSUPPORT] = _string_syserrmsgs + 2068,
  106. [ESOCKTNOSUPPORT] = _string_syserrmsgs + 2091,
  107. [EOPNOTSUPP] = _string_syserrmsgs + 2117,
  108. [EPFNOSUPPORT] = _string_syserrmsgs + 2141,
  109. [EAFNOSUPPORT] = _string_syserrmsgs + 2171,
  110. [EADDRINUSE] = _string_syserrmsgs + 2212,
  111. [EADDRNOTAVAIL] = _string_syserrmsgs + 2235,
  112. [ENETDOWN] = _string_syserrmsgs + 2267,
  113. [ENETUNREACH] = _string_syserrmsgs + 2283,
  114. [ENETRESET] = _string_syserrmsgs + 2306,
  115. [ECONNABORTED] = _string_syserrmsgs + 2342,
  116. [ECONNRESET] = _string_syserrmsgs + 2375,
  117. [ENOBUFS] = _string_syserrmsgs + 2400,
  118. [EISCONN] = _string_syserrmsgs + 2426,
  119. [ENOTCONN] = _string_syserrmsgs + 2466,
  120. [ESHUTDOWN] = _string_syserrmsgs + 2502,
  121. [ETOOMANYREFS] = _string_syserrmsgs + 2548,
  122. [ETIMEDOUT] = _string_syserrmsgs + 2583,
  123. [ECONNREFUSED] = _string_syserrmsgs + 2604,
  124. [EHOSTDOWN] = _string_syserrmsgs + 2623,
  125. [EHOSTUNREACH] = _string_syserrmsgs + 2636,
  126. [EALREADY] = _string_syserrmsgs + 2653,
  127. [EINPROGRESS] = _string_syserrmsgs + 2683,
  128. [ESTALE] = _string_syserrmsgs + 2709,
  129. [EUCLEAN] = _string_syserrmsgs + 2731,
  130. [ENOTNAM] = _string_syserrmsgs + 2756,
  131. [ENAVAIL] = _string_syserrmsgs + 2784,
  132. [EISNAM] = _string_syserrmsgs + 2814,
  133. [EREMOTEIO] = _string_syserrmsgs + 2835,
  134. [EDQUOT] = _string_syserrmsgs + 2852,
  135. [ENOMEDIUM] = _string_syserrmsgs + 2872,
  136. [EMEDIUMTYPE] = _string_syserrmsgs + 2888,
  137. #if EDEADLOCK != EDEADLK
  138. [EDEADLOCK] = _string_syserrmsgs + 2906,
  139. #endif
  140. #if EWOULDBLOCK != EAGAIN
  141. #error EWOULDBLOCK does not equal EAGAIN
  142. #endif
  143. /* For now, ignore the other arch-specific errors. glibc only maps EPROCLIM. */
  144. /* some other mips errors */
  145. #ifdef ECANCELED
  146. #endif
  147. #ifdef EINIT
  148. #endif
  149. #ifdef EREMDEV
  150. #endif
  151. /* some other sparc errors */
  152. #ifdef EPROCLIM
  153. #endif
  154. #ifdef ERREMOTE
  155. #endif
  156. };
  157. int sys_nerr = sizeof(sys_errlist)/sizeof(sys_errlist[0]);
  158. #endif