11ac2776bSEd Maste/*- 2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 31ac2776bSEd Maste * 41ac2776bSEd Maste * Copyright (c) 1994-1996 Søren Schmidt 51ac2776bSEd Maste * All rights reserved. 61ac2776bSEd Maste * 71ac2776bSEd Maste * Redistribution and use in source and binary forms, with or without 81ac2776bSEd Maste * modification, are permitted provided that the following conditions 91ac2776bSEd Maste * are met: 101ac2776bSEd Maste * 1. Redistributions of source code must retain the above copyright 111ac2776bSEd Maste * notice, this list of conditions and the following disclaimer. 121ac2776bSEd Maste * 2. Redistributions in binary form must reproduce the above copyright 131ac2776bSEd Maste * notice, this list of conditions and the following disclaimer in the 141ac2776bSEd Maste * documentation and/or other materials provided with the distribution. 151ac2776bSEd Maste * 161ac2776bSEd Maste * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 171ac2776bSEd Maste * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 181ac2776bSEd Maste * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 191ac2776bSEd Maste * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 201ac2776bSEd Maste * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 211ac2776bSEd Maste * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 221ac2776bSEd Maste * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 231ac2776bSEd Maste * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 241ac2776bSEd Maste * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 251ac2776bSEd Maste * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 261ac2776bSEd Maste * SUCH DAMAGE. 271ac2776bSEd Maste */ 281ac2776bSEd Maste 291ac2776bSEd Maste/* 301ac2776bSEd Maste * Linux syscalls return negative errno's, we do positive and map them 311ac2776bSEd Maste * Reference: 321ac2776bSEd Maste * FreeBSD: src/sys/sys/errno.h 331ac2776bSEd Maste * Linux: include/uapi/asm-generic/errno-base.h 341ac2776bSEd Maste * include/uapi/asm-generic/errno.h 351a8577faSEdward Tomasz Napierala * 361a8577faSEdward Tomasz Napierala * XXX: The "XXX" comments below should be replaced with rationale 371a8577faSEdward Tomasz Napierala * for the errno value chosen. 381ac2776bSEd Maste */ 397abf30d3SEdward Tomasz Napieralastatic const int linux_errtbl[ELAST + 1] = { 401701c69bSEdward Tomasz Napierala /* [0, 9] */ 411701c69bSEdward Tomasz Napierala [0] = -0, 421a8577faSEdward Tomasz Napierala [EPERM] = -LINUX_EPERM, 431a8577faSEdward Tomasz Napierala [ENOENT] = -LINUX_ENOENT, 441a8577faSEdward Tomasz Napierala [ESRCH] = -LINUX_ESRCH, 451a8577faSEdward Tomasz Napierala [EINTR] = -LINUX_EINTR, 461a8577faSEdward Tomasz Napierala [EIO] = -LINUX_EIO, 471a8577faSEdward Tomasz Napierala [ENXIO] = -LINUX_ENXIO, 481a8577faSEdward Tomasz Napierala [E2BIG] = -LINUX_E2BIG, 491a8577faSEdward Tomasz Napierala [ENOEXEC] = -LINUX_ENOEXEC, 501a8577faSEdward Tomasz Napierala [EBADF] = -LINUX_EBADF, 511ac2776bSEd Maste 521701c69bSEdward Tomasz Napierala /* [10, 19] */ 531a8577faSEdward Tomasz Napierala [ECHILD] = -LINUX_ECHILD, 541a8577faSEdward Tomasz Napierala [EDEADLK] = -LINUX_EDEADLK, 551a8577faSEdward Tomasz Napierala [ENOMEM] = -LINUX_ENOMEM, 561a8577faSEdward Tomasz Napierala [EACCES] = -LINUX_EACCES, 571a8577faSEdward Tomasz Napierala [EFAULT] = -LINUX_EFAULT, 581a8577faSEdward Tomasz Napierala [ENOTBLK] = -LINUX_ENOTBLK, 591a8577faSEdward Tomasz Napierala [EBUSY] = -LINUX_EBUSY, 601a8577faSEdward Tomasz Napierala [EEXIST] = -LINUX_EEXIST, 611a8577faSEdward Tomasz Napierala [EXDEV] = -LINUX_EXDEV, 621a8577faSEdward Tomasz Napierala [ENODEV] = -LINUX_ENODEV, 631ac2776bSEd Maste 641701c69bSEdward Tomasz Napierala /* [20, 29] */ 651a8577faSEdward Tomasz Napierala [ENOTDIR] = -LINUX_ENOTDIR, 661a8577faSEdward Tomasz Napierala [EISDIR] = -LINUX_EISDIR, 671a8577faSEdward Tomasz Napierala [EINVAL] = -LINUX_EINVAL, 681a8577faSEdward Tomasz Napierala [ENFILE] = -LINUX_ENFILE, 691a8577faSEdward Tomasz Napierala [EMFILE] = -LINUX_EMFILE, 701a8577faSEdward Tomasz Napierala [ENOTTY] = -LINUX_ENOTTY, 711a8577faSEdward Tomasz Napierala [ETXTBSY] = -LINUX_ETXTBSY, 721a8577faSEdward Tomasz Napierala [EFBIG] = -LINUX_EFBIG, 731a8577faSEdward Tomasz Napierala [ENOSPC] = -LINUX_ENOSPC, 741a8577faSEdward Tomasz Napierala [ESPIPE] = -LINUX_ESPIPE, 751ac2776bSEd Maste 761701c69bSEdward Tomasz Napierala /* [30, 39] */ 771a8577faSEdward Tomasz Napierala [EROFS] = -LINUX_EROFS, 781a8577faSEdward Tomasz Napierala [EMLINK] = -LINUX_EMLINK, 791a8577faSEdward Tomasz Napierala [EPIPE] = -LINUX_EPIPE, 801a8577faSEdward Tomasz Napierala [EDOM] = -LINUX_EDOM, 811a8577faSEdward Tomasz Napierala [ERANGE] = -LINUX_ERANGE, 821a8577faSEdward Tomasz Napierala [EAGAIN] = -LINUX_EAGAIN, 831a8577faSEdward Tomasz Napierala [EINPROGRESS] = -LINUX_EINPROGRESS, 841a8577faSEdward Tomasz Napierala [EALREADY] = -LINUX_EALREADY, 851a8577faSEdward Tomasz Napierala [ENOTSOCK] = -LINUX_ENOTSOCK, 861a8577faSEdward Tomasz Napierala [EDESTADDRREQ] = -LINUX_EDESTADDRREQ, 871ac2776bSEd Maste 881701c69bSEdward Tomasz Napierala /* [40, 49] */ 891a8577faSEdward Tomasz Napierala [EMSGSIZE] = -LINUX_EMSGSIZE, 901a8577faSEdward Tomasz Napierala [EPROTOTYPE] = -LINUX_EPROTOTYPE, 911a8577faSEdward Tomasz Napierala [ENOPROTOOPT] = -LINUX_ENOPROTOOPT, 921a8577faSEdward Tomasz Napierala [EPROTONOSUPPORT] = -LINUX_EPROTONOTSUPPORT, 931a8577faSEdward Tomasz Napierala [ESOCKTNOSUPPORT] = -LINUX_ESOCKNOTSUPPORT, 941a8577faSEdward Tomasz Napierala [EOPNOTSUPP] = -LINUX_EOPNOTSUPPORT, 951a8577faSEdward Tomasz Napierala [EPFNOSUPPORT] = -LINUX_EPFNOTSUPPORT, 961a8577faSEdward Tomasz Napierala [EAFNOSUPPORT] = -LINUX_EAFNOTSUPPORT, 971a8577faSEdward Tomasz Napierala [EADDRINUSE] = -LINUX_EADDRINUSE, 981a8577faSEdward Tomasz Napierala [EADDRNOTAVAIL] = -LINUX_EADDRNOTAVAIL, 991ac2776bSEd Maste 1001701c69bSEdward Tomasz Napierala /* [50, 59] */ 1011a8577faSEdward Tomasz Napierala [ENETDOWN] = -LINUX_ENETDOWN, 1021a8577faSEdward Tomasz Napierala [ENETUNREACH] = -LINUX_ENETUNREACH, 1031a8577faSEdward Tomasz Napierala [ENETRESET] = -LINUX_ENETRESET, 1041a8577faSEdward Tomasz Napierala [ECONNABORTED] = -LINUX_ECONNABORTED, 1051a8577faSEdward Tomasz Napierala [ECONNRESET] = -LINUX_ECONNRESET, 1061a8577faSEdward Tomasz Napierala [ENOBUFS] = -LINUX_ENOBUFS, 1071a8577faSEdward Tomasz Napierala [EISCONN] = -LINUX_EISCONN, 1081a8577faSEdward Tomasz Napierala [ENOTCONN] = -LINUX_ENOTCONN, 1091a8577faSEdward Tomasz Napierala [ESHUTDOWN] = -LINUX_ESHUTDOWN, 1101a8577faSEdward Tomasz Napierala [ETOOMANYREFS] = -LINUX_ETOOMANYREFS, 1111ac2776bSEd Maste 1121701c69bSEdward Tomasz Napierala /* [60, 69] */ 1131a8577faSEdward Tomasz Napierala [ETIMEDOUT] = -LINUX_ETIMEDOUT, 1141a8577faSEdward Tomasz Napierala [ECONNREFUSED] = -LINUX_ECONNREFUSED, 1151a8577faSEdward Tomasz Napierala [ELOOP] = -LINUX_ELOOP, 1161a8577faSEdward Tomasz Napierala [ENAMETOOLONG] = -LINUX_ENAMETOOLONG, 1171a8577faSEdward Tomasz Napierala [EHOSTDOWN] = -LINUX_EHOSTDOWN, 1181a8577faSEdward Tomasz Napierala [EHOSTUNREACH] = -LINUX_EHOSTUNREACH, 1191a8577faSEdward Tomasz Napierala [ENOTEMPTY] = -LINUX_ENOTEMPTY, 1201a8577faSEdward Tomasz Napierala [EPROCLIM] = -LINUX_EAGAIN, /* XXX */ 1211a8577faSEdward Tomasz Napierala [EUSERS] = -LINUX_EUSERS, 1221a8577faSEdward Tomasz Napierala [EDQUOT] = -LINUX_EDQUOT, 1231ac2776bSEd Maste 1241701c69bSEdward Tomasz Napierala /* [70, 79] */ 1251a8577faSEdward Tomasz Napierala [ESTALE] = -LINUX_ESTALE, 1261a8577faSEdward Tomasz Napierala [EREMOTE] = -LINUX_EREMOTE, 1271a8577faSEdward Tomasz Napierala [EBADRPC] = -LINUX_ENXIO, /* XXX */ 1281a8577faSEdward Tomasz Napierala [ERPCMISMATCH] = -LINUX_ENXIO, /* XXX */ 1291a8577faSEdward Tomasz Napierala [EPROGUNAVAIL] = -LINUX_ENXIO, /* XXX */ 1301a8577faSEdward Tomasz Napierala [EPROGMISMATCH] = -LINUX_ENXIO, /* XXX */ 1311a8577faSEdward Tomasz Napierala [EPROCUNAVAIL] = -LINUX_ENXIO, /* XXX */ 1321a8577faSEdward Tomasz Napierala [ENOLCK] = -LINUX_ENOLCK, 1331a8577faSEdward Tomasz Napierala [ENOSYS] = -LINUX_ENOSYS, 1341a8577faSEdward Tomasz Napierala [EFTYPE] = -LINUX_EBADF, /* XXX */ 1351ac2776bSEd Maste 1361701c69bSEdward Tomasz Napierala /* [80, 89] */ 1371a8577faSEdward Tomasz Napierala [EAUTH] = -LINUX_ENXIO, /* XXX */ 1381a8577faSEdward Tomasz Napierala [ENEEDAUTH] = -LINUX_ENXIO, /* XXX */ 1391a8577faSEdward Tomasz Napierala [EIDRM] = -LINUX_EIDRM, 1401a8577faSEdward Tomasz Napierala [ENOMSG] = -LINUX_ENOMSG, 1411a8577faSEdward Tomasz Napierala [EOVERFLOW] = -LINUX_EOVERFLOW, 1421a8577faSEdward Tomasz Napierala [ECANCELED] = -LINUX_ECANCELED, 1431a8577faSEdward Tomasz Napierala [EILSEQ] = -LINUX_EILSEQ, 1441a8577faSEdward Tomasz Napierala [ENOATTR] = -LINUX_ENODATA, /* XXX */ 1451a8577faSEdward Tomasz Napierala [EDOOFUS] = -LINUX_EINVAL, /* XXX */ 1461a8577faSEdward Tomasz Napierala [EBADMSG] = -LINUX_EBADMSG, 1471ac2776bSEd Maste 1481701c69bSEdward Tomasz Napierala /* [90, 99] */ 1491a8577faSEdward Tomasz Napierala [EMULTIHOP] = -LINUX_EMULTIHOP, 1501a8577faSEdward Tomasz Napierala [ENOLINK] = -LINUX_ENOLINK, 1511a8577faSEdward Tomasz Napierala [EPROTO] = -LINUX_EPROTO, 1521a8577faSEdward Tomasz Napierala [ENOTCAPABLE] = -LINUX_EPERM, /* XXX */ 1531a8577faSEdward Tomasz Napierala [ECAPMODE] = -LINUX_EPERM, /* XXX */ 1541a8577faSEdward Tomasz Napierala [ENOTRECOVERABLE] = -LINUX_ENOTRECOVERABLE, 1551a8577faSEdward Tomasz Napierala [EOWNERDEAD] = -LINUX_EOWNERDEAD, 1561a8577faSEdward Tomasz Napierala [EINTEGRITY] = -LINUX_EINVAL, /* XXX */ 1571ac2776bSEd Maste}; 1581ac2776bSEd Maste 15988640c0eSKirk McKusick_Static_assert(ELAST == 97, 1601ac2776bSEd Maste "missing errno entries in linux_errtbl"); 1612f927d87SEdward Tomasz Napierala 1622f927d87SEdward Tomasz Napieralastatic const int linux_to_bsd_errtbl[LINUX_ELAST + 1] = { 1632f927d87SEdward Tomasz Napierala /* [0, 9] */ 1642f927d87SEdward Tomasz Napierala [0] = 0, 1652f927d87SEdward Tomasz Napierala [LINUX_EPERM] = EPERM, 1662f927d87SEdward Tomasz Napierala [LINUX_ENOENT] = ENOENT, 1672f927d87SEdward Tomasz Napierala [LINUX_ESRCH] = ESRCH, 1682f927d87SEdward Tomasz Napierala [LINUX_EINTR] = EINTR, 1692f927d87SEdward Tomasz Napierala [LINUX_EIO] = EIO, 1702f927d87SEdward Tomasz Napierala [LINUX_ENXIO] = ENXIO, 1712f927d87SEdward Tomasz Napierala [LINUX_E2BIG] = E2BIG, 1722f927d87SEdward Tomasz Napierala [LINUX_ENOEXEC] = ENOENT, 1732f927d87SEdward Tomasz Napierala [LINUX_EBADF] = EBADF, 1742f927d87SEdward Tomasz Napierala 1752f927d87SEdward Tomasz Napierala /* [10, 19] */ 1762f927d87SEdward Tomasz Napierala [LINUX_ECHILD] = ECHILD, 1772f927d87SEdward Tomasz Napierala [LINUX_EAGAIN] = EAGAIN, 1782f927d87SEdward Tomasz Napierala [LINUX_ENOMEM] = ENOMEM, 1792f927d87SEdward Tomasz Napierala [LINUX_EACCES] = EACCES, 1802f927d87SEdward Tomasz Napierala [LINUX_EFAULT] = EFAULT, 1812f927d87SEdward Tomasz Napierala [LINUX_ENOTBLK] = ENOTBLK, 1822f927d87SEdward Tomasz Napierala [LINUX_EBUSY] = EBUSY, 1832f927d87SEdward Tomasz Napierala [LINUX_EEXIST] = EEXIST, 1842f927d87SEdward Tomasz Napierala [LINUX_EXDEV] = EXDEV, 1852f927d87SEdward Tomasz Napierala [LINUX_ENODEV] = ENODEV, 1862f927d87SEdward Tomasz Napierala 1872f927d87SEdward Tomasz Napierala /* [20, 29] */ 1882f927d87SEdward Tomasz Napierala [LINUX_ENOTDIR] = ENOTDIR, 1892f927d87SEdward Tomasz Napierala [LINUX_EISDIR] = EISDIR, 1902f927d87SEdward Tomasz Napierala [LINUX_EINVAL] = EINVAL, 1912f927d87SEdward Tomasz Napierala [LINUX_ENFILE] = ENFILE, 1922f927d87SEdward Tomasz Napierala [LINUX_EMFILE] = EMFILE, 1932f927d87SEdward Tomasz Napierala [LINUX_ENOTTY] = ENOTTY, 1942f927d87SEdward Tomasz Napierala [LINUX_ETXTBSY] = ETXTBSY, 1952f927d87SEdward Tomasz Napierala [LINUX_EFBIG] = EFBIG, 1962f927d87SEdward Tomasz Napierala [LINUX_ENOSPC] = ENOSPC, 1972f927d87SEdward Tomasz Napierala [LINUX_ESPIPE] = ESPIPE, 1982f927d87SEdward Tomasz Napierala 1992f927d87SEdward Tomasz Napierala /* [30, 39] */ 2002f927d87SEdward Tomasz Napierala [LINUX_EROFS] = EROFS, 2012f927d87SEdward Tomasz Napierala [LINUX_EMLINK] = EMLINK, 2022f927d87SEdward Tomasz Napierala [LINUX_EPIPE] = EPIPE, 2032f927d87SEdward Tomasz Napierala [LINUX_EDOM] = EDOM, 2042f927d87SEdward Tomasz Napierala [LINUX_ERANGE] = ERANGE, 2052f927d87SEdward Tomasz Napierala [LINUX_EDEADLK] = EDEADLK, 2062f927d87SEdward Tomasz Napierala [LINUX_ENAMETOOLONG] = ENAMETOOLONG, 2072f927d87SEdward Tomasz Napierala [LINUX_ENOLCK] = ENOLCK, 2082f927d87SEdward Tomasz Napierala [LINUX_ENOSYS] = ENOSYS, 2092f927d87SEdward Tomasz Napierala [LINUX_ENOTEMPTY] = ENOTEMPTY, 2102f927d87SEdward Tomasz Napierala 2112f927d87SEdward Tomasz Napierala /* [40, 49] */ 2122f927d87SEdward Tomasz Napierala [LINUX_ELOOP] = ELOOP, 2132f927d87SEdward Tomasz Napierala [41] = EINVAL, 2142f927d87SEdward Tomasz Napierala [LINUX_ENOMSG] = ENOMSG, 2152f927d87SEdward Tomasz Napierala [LINUX_EIDRM] = EIDRM, 2162f927d87SEdward Tomasz Napierala [LINUX_ECHRNG] = EINVAL, /* XXX */ 2172f927d87SEdward Tomasz Napierala [LINUX_EL2NSYNC] = EINVAL, /* XXX */ 2182f927d87SEdward Tomasz Napierala [LINUX_EL3HLT] = EINVAL, /* XXX */ 2192f927d87SEdward Tomasz Napierala [LINUX_EL3RST] = EINVAL, /* XXX */ 2202f927d87SEdward Tomasz Napierala [LINUX_ELNRNG] = EINVAL, /* XXX */ 2212f927d87SEdward Tomasz Napierala [LINUX_EUNATCH] = EINVAL, /* XXX */ 2222f927d87SEdward Tomasz Napierala 2232f927d87SEdward Tomasz Napierala /* [50, 59] */ 2242f927d87SEdward Tomasz Napierala [LINUX_ENOCSI] = EINVAL, /* XXX */ 2252f927d87SEdward Tomasz Napierala [LINUX_EL2HLT] = EINVAL, /* XXX */ 2262f927d87SEdward Tomasz Napierala [LINUX_EBADE] = EINVAL, /* XXX */ 2272f927d87SEdward Tomasz Napierala [LINUX_EBADR] = EINVAL, /* XXX */ 2282f927d87SEdward Tomasz Napierala [LINUX_EXFULL] = EINVAL, /* XXX */ 2292f927d87SEdward Tomasz Napierala [LINUX_ENOANO] = EINVAL, /* XXX */ 2302f927d87SEdward Tomasz Napierala [LINUX_EBADRQC] = EINVAL, /* XXX */ 2312f927d87SEdward Tomasz Napierala [LINUX_EBADSLT] = EINVAL, /* XXX */ 2322f927d87SEdward Tomasz Napierala [58] = EINVAL, 2332f927d87SEdward Tomasz Napierala [LINUX_EBFONT] = EINVAL, /* XXX */ 2342f927d87SEdward Tomasz Napierala 2352f927d87SEdward Tomasz Napierala /* [60, 69] */ 2362f927d87SEdward Tomasz Napierala [LINUX_ENOSTR] = EINVAL, /* XXX */ 2372f927d87SEdward Tomasz Napierala [LINUX_ENODATA] = ENOATTR, /* XXX */ 2382f927d87SEdward Tomasz Napierala [LINUX_ENOTIME] = EINVAL, /* XXX */ 2392f927d87SEdward Tomasz Napierala [LINUX_ENOSR] = EINVAL, /* XXX */ 2402f927d87SEdward Tomasz Napierala [LINUX_ENONET] = EINVAL, /* XXX */ 2412f927d87SEdward Tomasz Napierala [LINUX_ENOPKG] = EINVAL, /* XXX */ 2422f927d87SEdward Tomasz Napierala [LINUX_EREMOTE] = EREMOTE, 2432f927d87SEdward Tomasz Napierala [LINUX_ENOLINK] = ENOLINK, 2442f927d87SEdward Tomasz Napierala [LINUX_EADV] = EINVAL, /* XXX */ 2452f927d87SEdward Tomasz Napierala [LINUX_ESRMNT] = EINVAL, /* XXX */ 2462f927d87SEdward Tomasz Napierala 2472f927d87SEdward Tomasz Napierala /* [70, 79] */ 2482f927d87SEdward Tomasz Napierala [LINUX_ECOMM] = EINVAL, /* XXX */ 2492f927d87SEdward Tomasz Napierala [LINUX_EPROTO] = EPROTO, 2502f927d87SEdward Tomasz Napierala [LINUX_EMULTIHOP] = EMULTIHOP, 2512f927d87SEdward Tomasz Napierala [LINUX_EDOTDOT] = EINVAL, /* XXX */ 2522f927d87SEdward Tomasz Napierala [LINUX_EBADMSG] = EBADMSG, 2532f927d87SEdward Tomasz Napierala [LINUX_EOVERFLOW] = EOVERFLOW, 2542f927d87SEdward Tomasz Napierala [LINUX_ENOTUNIQ] = EINVAL, /* XXX */ 2552f927d87SEdward Tomasz Napierala [LINUX_EBADFD] = EBADF, /* XXX */ 2562f927d87SEdward Tomasz Napierala [LINUX_EREMCHG] = EINVAL, /* XXX */ 2572f927d87SEdward Tomasz Napierala [LINUX_ELIBACC] = EINVAL, /* XXX */ 2582f927d87SEdward Tomasz Napierala 2592f927d87SEdward Tomasz Napierala /* [80, 89] */ 2602f927d87SEdward Tomasz Napierala [LINUX_ELIBBAD] = EINVAL, /* XXX */ 2612f927d87SEdward Tomasz Napierala [LINUX_ELIBSCN] = EINVAL, /* XXX */ 2622f927d87SEdward Tomasz Napierala [LINUX_ELIBMAX] = EINVAL, /* XXX */ 2632f927d87SEdward Tomasz Napierala [LINUX_ELIBEXEC] = EINVAL, /* XXX */ 2642f927d87SEdward Tomasz Napierala [LINUX_EILSEQ] = EILSEQ, 2652f927d87SEdward Tomasz Napierala [LINUX_ERESTART] = EAGAIN, /* XXX */ 2662f927d87SEdward Tomasz Napierala [LINUX_ESTRPIPE] = EINVAL, /* XXX */ 2672f927d87SEdward Tomasz Napierala [LINUX_EUSERS] = EUSERS, 2682f927d87SEdward Tomasz Napierala [LINUX_ENOTSOCK] = ENOTSOCK, 2692f927d87SEdward Tomasz Napierala [LINUX_EDESTADDRREQ] = EDESTADDRREQ, 2702f927d87SEdward Tomasz Napierala 2712f927d87SEdward Tomasz Napierala /* [90, 99] */ 2722f927d87SEdward Tomasz Napierala [LINUX_EMSGSIZE] = EMSGSIZE, 2732f927d87SEdward Tomasz Napierala [LINUX_EPROTOTYPE] = EPROTOTYPE, 2742f927d87SEdward Tomasz Napierala [LINUX_ENOPROTOOPT] = ENOPROTOOPT, 2752f927d87SEdward Tomasz Napierala [LINUX_EPROTONOTSUPPORT] = EPROTONOSUPPORT, 2762f927d87SEdward Tomasz Napierala [LINUX_ESOCKNOTSUPPORT] = EPROTONOSUPPORT, /* XXX */ 2772f927d87SEdward Tomasz Napierala [LINUX_EOPNOTSUPPORT] = EOPNOTSUPP, 2782f927d87SEdward Tomasz Napierala [LINUX_EPFNOTSUPPORT] = EPFNOSUPPORT, 2792f927d87SEdward Tomasz Napierala [LINUX_EAFNOTSUPPORT] = EAFNOSUPPORT, 2802f927d87SEdward Tomasz Napierala [LINUX_EADDRINUSE] = EADDRINUSE, 2812f927d87SEdward Tomasz Napierala [LINUX_EADDRNOTAVAIL] = EADDRNOTAVAIL, 2822f927d87SEdward Tomasz Napierala 2832f927d87SEdward Tomasz Napierala /* [100, 109] */ 2842f927d87SEdward Tomasz Napierala [LINUX_ENETDOWN] = ENETDOWN, 2852f927d87SEdward Tomasz Napierala [LINUX_ENETUNREACH] = ENETUNREACH, 2862f927d87SEdward Tomasz Napierala [LINUX_ENETRESET] = ENETRESET, 2872f927d87SEdward Tomasz Napierala [LINUX_ECONNABORTED] = ECONNABORTED, 2882f927d87SEdward Tomasz Napierala [LINUX_ECONNRESET] = ECONNRESET, 2892f927d87SEdward Tomasz Napierala [LINUX_ENOBUFS] = ENOBUFS, 2902f927d87SEdward Tomasz Napierala [LINUX_EISCONN] = EISCONN, 2912f927d87SEdward Tomasz Napierala [LINUX_ENOTCONN] = ENOTCONN, 2922f927d87SEdward Tomasz Napierala [LINUX_ESHUTDOWN] = ESHUTDOWN, 2932f927d87SEdward Tomasz Napierala [LINUX_ETOOMANYREFS] = ETOOMANYREFS, 2942f927d87SEdward Tomasz Napierala 2952f927d87SEdward Tomasz Napierala /* [110, 119] */ 2962f927d87SEdward Tomasz Napierala [LINUX_ETIMEDOUT] = ETIMEDOUT, 2972f927d87SEdward Tomasz Napierala [LINUX_ECONNREFUSED] = ECONNREFUSED, 2982f927d87SEdward Tomasz Napierala [LINUX_EHOSTDOWN] = EHOSTDOWN, 2992f927d87SEdward Tomasz Napierala [LINUX_EHOSTUNREACH] = EHOSTUNREACH, 3002f927d87SEdward Tomasz Napierala [LINUX_EALREADY] = EALREADY, 3012f927d87SEdward Tomasz Napierala [LINUX_EINPROGRESS] = EINPROGRESS, 3022f927d87SEdward Tomasz Napierala [LINUX_ESTALE] = ESTALE, 3032f927d87SEdward Tomasz Napierala [LINUX_EUCLEAN] = EINVAL, /* XXX */ 3042f927d87SEdward Tomasz Napierala [LINUX_ENOTNAM] = EINVAL, /* XXX */ 3052f927d87SEdward Tomasz Napierala [LINUX_ENAVAIL] = EINVAL, /* XXX */ 3062f927d87SEdward Tomasz Napierala 3072f927d87SEdward Tomasz Napierala /* [120, 129] */ 3082f927d87SEdward Tomasz Napierala [LINUX_EISNAM] = EINVAL, /* XXX */ 3092f927d87SEdward Tomasz Napierala [LINUX_EREMOTEIO] = EINVAL, /* XXX */ 3102f927d87SEdward Tomasz Napierala [LINUX_EDQUOT] = EDQUOT, 3112f927d87SEdward Tomasz Napierala [LINUX_ENOMEDIUM] = EIO, /* XXX */ 3122f927d87SEdward Tomasz Napierala [LINUX_EMEDIUMTYPE] = EIO, /* XXX */ 3132f927d87SEdward Tomasz Napierala [LINUX_ECANCELED] = ECANCELED, 3142f927d87SEdward Tomasz Napierala [LINUX_ENOKEY] = EIO, /* XXX */ 3152f927d87SEdward Tomasz Napierala [LINUX_EKEYEXPIRED] = EIO, /* XXX */ 3162f927d87SEdward Tomasz Napierala [LINUX_EKEYREVOKED] = EIO, /* XXX */ 3172f927d87SEdward Tomasz Napierala [LINUX_EKEYREJECTED] = EIO, /* XXX */ 3182f927d87SEdward Tomasz Napierala 3192f927d87SEdward Tomasz Napierala /* [130, 139] */ 3202f927d87SEdward Tomasz Napierala [LINUX_EOWNERDEAD] = EOWNERDEAD, 3212f927d87SEdward Tomasz Napierala [LINUX_ENOTRECOVERABLE] = ENOTRECOVERABLE, 3222f927d87SEdward Tomasz Napierala [LINUX_ERFKILL] = ENETDOWN, /* XXX */ 3232f927d87SEdward Tomasz Napierala [LINUX_EHWPOISON] = EINVAL, /* XXX */ 3242f927d87SEdward Tomasz Napierala}; 3252f927d87SEdward Tomasz Napierala 3262f927d87SEdward Tomasz Napierala_Static_assert(LINUX_ELAST == 133, 3272f927d87SEdward Tomasz Napierala "missing errno entries in linux_to_bsd_errtbl"); 328