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