sys_errlist.c 6.1 KB

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