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 * $FreeBSD$ 291ac2776bSEd Maste */ 301ac2776bSEd Maste 311ac2776bSEd Maste/* 321ac2776bSEd Maste * Linux syscalls return negative errno's, we do positive and map them 331ac2776bSEd Maste * Reference: 341ac2776bSEd Maste * FreeBSD: src/sys/sys/errno.h 351ac2776bSEd Maste * Linux: include/uapi/asm-generic/errno-base.h 361ac2776bSEd Maste * include/uapi/asm-generic/errno.h 371a8577faSEdward Tomasz Napierala * 381a8577faSEdward Tomasz Napierala * XXX: The "XXX" comments below should be replaced with rationale 391a8577faSEdward Tomasz Napierala * for the errno value chosen. 401ac2776bSEd Maste */ 417abf30d3SEdward Tomasz Napieralastatic const int linux_errtbl[ELAST + 1] = { 421701c69bSEdward Tomasz Napierala /* [0, 9] */ 431701c69bSEdward Tomasz Napierala [0] = -0, 441a8577faSEdward Tomasz Napierala [EPERM] = -LINUX_EPERM, 451a8577faSEdward Tomasz Napierala [ENOENT] = -LINUX_ENOENT, 461a8577faSEdward Tomasz Napierala [ESRCH] = -LINUX_ESRCH, 471a8577faSEdward Tomasz Napierala [EINTR] = -LINUX_EINTR, 481a8577faSEdward Tomasz Napierala [EIO] = -LINUX_EIO, 491a8577faSEdward Tomasz Napierala [ENXIO] = -LINUX_ENXIO, 501a8577faSEdward Tomasz Napierala [E2BIG] = -LINUX_E2BIG, 511a8577faSEdward Tomasz Napierala [ENOEXEC] = -LINUX_ENOEXEC, 521a8577faSEdward Tomasz Napierala [EBADF] = -LINUX_EBADF, 531ac2776bSEd Maste 541701c69bSEdward Tomasz Napierala /* [10, 19] */ 551a8577faSEdward Tomasz Napierala [ECHILD] = -LINUX_ECHILD, 561a8577faSEdward Tomasz Napierala [EDEADLK] = -LINUX_EDEADLK, 571a8577faSEdward Tomasz Napierala [ENOMEM] = -LINUX_ENOMEM, 581a8577faSEdward Tomasz Napierala [EACCES] = -LINUX_EACCES, 591a8577faSEdward Tomasz Napierala [EFAULT] = -LINUX_EFAULT, 601a8577faSEdward Tomasz Napierala [ENOTBLK] = -LINUX_ENOTBLK, 611a8577faSEdward Tomasz Napierala [EBUSY] = -LINUX_EBUSY, 621a8577faSEdward Tomasz Napierala [EEXIST] = -LINUX_EEXIST, 631a8577faSEdward Tomasz Napierala [EXDEV] = -LINUX_EXDEV, 641a8577faSEdward Tomasz Napierala [ENODEV] = -LINUX_ENODEV, 651ac2776bSEd Maste 661701c69bSEdward Tomasz Napierala /* [20, 29] */ 671a8577faSEdward Tomasz Napierala [ENOTDIR] = -LINUX_ENOTDIR, 681a8577faSEdward Tomasz Napierala [EISDIR] = -LINUX_EISDIR, 691a8577faSEdward Tomasz Napierala [EINVAL] = -LINUX_EINVAL, 701a8577faSEdward Tomasz Napierala [ENFILE] = -LINUX_ENFILE, 711a8577faSEdward Tomasz Napierala [EMFILE] = -LINUX_EMFILE, 721a8577faSEdward Tomasz Napierala [ENOTTY] = -LINUX_ENOTTY, 731a8577faSEdward Tomasz Napierala [ETXTBSY] = -LINUX_ETXTBSY, 741a8577faSEdward Tomasz Napierala [EFBIG] = -LINUX_EFBIG, 751a8577faSEdward Tomasz Napierala [ENOSPC] = -LINUX_ENOSPC, 761a8577faSEdward Tomasz Napierala [ESPIPE] = -LINUX_ESPIPE, 771ac2776bSEd Maste 781701c69bSEdward Tomasz Napierala /* [30, 39] */ 791a8577faSEdward Tomasz Napierala [EROFS] = -LINUX_EROFS, 801a8577faSEdward Tomasz Napierala [EMLINK] = -LINUX_EMLINK, 811a8577faSEdward Tomasz Napierala [EPIPE] = -LINUX_EPIPE, 821a8577faSEdward Tomasz Napierala [EDOM] = -LINUX_EDOM, 831a8577faSEdward Tomasz Napierala [ERANGE] = -LINUX_ERANGE, 841a8577faSEdward Tomasz Napierala [EAGAIN] = -LINUX_EAGAIN, 851a8577faSEdward Tomasz Napierala [EINPROGRESS] = -LINUX_EINPROGRESS, 861a8577faSEdward Tomasz Napierala [EALREADY] = -LINUX_EALREADY, 871a8577faSEdward Tomasz Napierala [ENOTSOCK] = -LINUX_ENOTSOCK, 881a8577faSEdward Tomasz Napierala [EDESTADDRREQ] = -LINUX_EDESTADDRREQ, 891ac2776bSEd Maste 901701c69bSEdward Tomasz Napierala /* [40, 49] */ 911a8577faSEdward Tomasz Napierala [EMSGSIZE] = -LINUX_EMSGSIZE, 921a8577faSEdward Tomasz Napierala [EPROTOTYPE] = -LINUX_EPROTOTYPE, 931a8577faSEdward Tomasz Napierala [ENOPROTOOPT] = -LINUX_ENOPROTOOPT, 941a8577faSEdward Tomasz Napierala [EPROTONOSUPPORT] = -LINUX_EPROTONOTSUPPORT, 951a8577faSEdward Tomasz Napierala [ESOCKTNOSUPPORT] = -LINUX_ESOCKNOTSUPPORT, 961a8577faSEdward Tomasz Napierala [EOPNOTSUPP] = -LINUX_EOPNOTSUPPORT, 971a8577faSEdward Tomasz Napierala [EPFNOSUPPORT] = -LINUX_EPFNOTSUPPORT, 981a8577faSEdward Tomasz Napierala [EAFNOSUPPORT] = -LINUX_EAFNOTSUPPORT, 991a8577faSEdward Tomasz Napierala [EADDRINUSE] = -LINUX_EADDRINUSE, 1001a8577faSEdward Tomasz Napierala [EADDRNOTAVAIL] = -LINUX_EADDRNOTAVAIL, 1011ac2776bSEd Maste 1021701c69bSEdward Tomasz Napierala /* [50, 59] */ 1031a8577faSEdward Tomasz Napierala [ENETDOWN] = -LINUX_ENETDOWN, 1041a8577faSEdward Tomasz Napierala [ENETUNREACH] = -LINUX_ENETUNREACH, 1051a8577faSEdward Tomasz Napierala [ENETRESET] = -LINUX_ENETRESET, 1061a8577faSEdward Tomasz Napierala [ECONNABORTED] = -LINUX_ECONNABORTED, 1071a8577faSEdward Tomasz Napierala [ECONNRESET] = -LINUX_ECONNRESET, 1081a8577faSEdward Tomasz Napierala [ENOBUFS] = -LINUX_ENOBUFS, 1091a8577faSEdward Tomasz Napierala [EISCONN] = -LINUX_EISCONN, 1101a8577faSEdward Tomasz Napierala [ENOTCONN] = -LINUX_ENOTCONN, 1111a8577faSEdward Tomasz Napierala [ESHUTDOWN] = -LINUX_ESHUTDOWN, 1121a8577faSEdward Tomasz Napierala [ETOOMANYREFS] = -LINUX_ETOOMANYREFS, 1131ac2776bSEd Maste 1141701c69bSEdward Tomasz Napierala /* [60, 69] */ 1151a8577faSEdward Tomasz Napierala [ETIMEDOUT] = -LINUX_ETIMEDOUT, 1161a8577faSEdward Tomasz Napierala [ECONNREFUSED] = -LINUX_ECONNREFUSED, 1171a8577faSEdward Tomasz Napierala [ELOOP] = -LINUX_ELOOP, 1181a8577faSEdward Tomasz Napierala [ENAMETOOLONG] = -LINUX_ENAMETOOLONG, 1191a8577faSEdward Tomasz Napierala [EHOSTDOWN] = -LINUX_EHOSTDOWN, 1201a8577faSEdward Tomasz Napierala [EHOSTUNREACH] = -LINUX_EHOSTUNREACH, 1211a8577faSEdward Tomasz Napierala [ENOTEMPTY] = -LINUX_ENOTEMPTY, 1221a8577faSEdward Tomasz Napierala [EPROCLIM] = -LINUX_EAGAIN, /* XXX */ 1231a8577faSEdward Tomasz Napierala [EUSERS] = -LINUX_EUSERS, 1241a8577faSEdward Tomasz Napierala [EDQUOT] = -LINUX_EDQUOT, 1251ac2776bSEd Maste 1261701c69bSEdward Tomasz Napierala /* [70, 79] */ 1271a8577faSEdward Tomasz Napierala [ESTALE] = -LINUX_ESTALE, 1281a8577faSEdward Tomasz Napierala [EREMOTE] = -LINUX_EREMOTE, 1291a8577faSEdward Tomasz Napierala [EBADRPC] = -LINUX_ENXIO, /* XXX */ 1301a8577faSEdward Tomasz Napierala [ERPCMISMATCH] = -LINUX_ENXIO, /* XXX */ 1311a8577faSEdward Tomasz Napierala [EPROGUNAVAIL] = -LINUX_ENXIO, /* XXX */ 1321a8577faSEdward Tomasz Napierala [EPROGMISMATCH] = -LINUX_ENXIO, /* XXX */ 1331a8577faSEdward Tomasz Napierala [EPROCUNAVAIL] = -LINUX_ENXIO, /* XXX */ 1341a8577faSEdward Tomasz Napierala [ENOLCK] = -LINUX_ENOLCK, 1351a8577faSEdward Tomasz Napierala [ENOSYS] = -LINUX_ENOSYS, 1361a8577faSEdward Tomasz Napierala [EFTYPE] = -LINUX_EBADF, /* XXX */ 1371ac2776bSEd Maste 1381701c69bSEdward Tomasz Napierala /* [80, 89] */ 1391a8577faSEdward Tomasz Napierala [EAUTH] = -LINUX_ENXIO, /* XXX */ 1401a8577faSEdward Tomasz Napierala [ENEEDAUTH] = -LINUX_ENXIO, /* XXX */ 1411a8577faSEdward Tomasz Napierala [EIDRM] = -LINUX_EIDRM, 1421a8577faSEdward Tomasz Napierala [ENOMSG] = -LINUX_ENOMSG, 1431a8577faSEdward Tomasz Napierala [EOVERFLOW] = -LINUX_EOVERFLOW, 1441a8577faSEdward Tomasz Napierala [ECANCELED] = -LINUX_ECANCELED, 1451a8577faSEdward Tomasz Napierala [EILSEQ] = -LINUX_EILSEQ, 1461a8577faSEdward Tomasz Napierala [ENOATTR] = -LINUX_ENODATA, /* XXX */ 1471a8577faSEdward Tomasz Napierala [EDOOFUS] = -LINUX_EINVAL, /* XXX */ 1481a8577faSEdward Tomasz Napierala [EBADMSG] = -LINUX_EBADMSG, 1491ac2776bSEd Maste 1501701c69bSEdward Tomasz Napierala /* [90, 99] */ 1511a8577faSEdward Tomasz Napierala [EMULTIHOP] = -LINUX_EMULTIHOP, 1521a8577faSEdward Tomasz Napierala [ENOLINK] = -LINUX_ENOLINK, 1531a8577faSEdward Tomasz Napierala [EPROTO] = -LINUX_EPROTO, 1541a8577faSEdward Tomasz Napierala [ENOTCAPABLE] = -LINUX_EPERM, /* XXX */ 1551a8577faSEdward Tomasz Napierala [ECAPMODE] = -LINUX_EPERM, /* XXX */ 1561a8577faSEdward Tomasz Napierala [ENOTRECOVERABLE] = -LINUX_ENOTRECOVERABLE, 1571a8577faSEdward Tomasz Napierala [EOWNERDEAD] = -LINUX_EOWNERDEAD, 1581a8577faSEdward Tomasz Napierala [EINTEGRITY] = -LINUX_EINVAL, /* XXX */ 1591ac2776bSEd Maste}; 1601ac2776bSEd Maste 16188640c0eSKirk McKusick_Static_assert(ELAST == 97, 1621ac2776bSEd Maste "missing errno entries in linux_errtbl"); 1632f927d87SEdward Tomasz Napierala 1642f927d87SEdward Tomasz Napieralastatic const int linux_to_bsd_errtbl[LINUX_ELAST + 1] = { 1652f927d87SEdward Tomasz Napierala /* [0, 9] */ 1662f927d87SEdward Tomasz Napierala [0] = 0, 1672f927d87SEdward Tomasz Napierala [LINUX_EPERM] = EPERM, 1682f927d87SEdward Tomasz Napierala [LINUX_ENOENT] = ENOENT, 1692f927d87SEdward Tomasz Napierala [LINUX_ESRCH] = ESRCH, 1702f927d87SEdward Tomasz Napierala [LINUX_EINTR] = EINTR, 1712f927d87SEdward Tomasz Napierala [LINUX_EIO] = EIO, 1722f927d87SEdward Tomasz Napierala [LINUX_ENXIO] = ENXIO, 1732f927d87SEdward Tomasz Napierala [LINUX_E2BIG] = E2BIG, 1742f927d87SEdward Tomasz Napierala [LINUX_ENOEXEC] = ENOENT, 1752f927d87SEdward Tomasz Napierala [LINUX_EBADF] = EBADF, 1762f927d87SEdward Tomasz Napierala 1772f927d87SEdward Tomasz Napierala /* [10, 19] */ 1782f927d87SEdward Tomasz Napierala [LINUX_ECHILD] = ECHILD, 1792f927d87SEdward Tomasz Napierala [LINUX_EAGAIN] = EAGAIN, 1802f927d87SEdward Tomasz Napierala [LINUX_ENOMEM] = ENOMEM, 1812f927d87SEdward Tomasz Napierala [LINUX_EACCES] = EACCES, 1822f927d87SEdward Tomasz Napierala [LINUX_EFAULT] = EFAULT, 1832f927d87SEdward Tomasz Napierala [LINUX_ENOTBLK] = ENOTBLK, 1842f927d87SEdward Tomasz Napierala [LINUX_EBUSY] = EBUSY, 1852f927d87SEdward Tomasz Napierala [LINUX_EEXIST] = EEXIST, 1862f927d87SEdward Tomasz Napierala [LINUX_EXDEV] = EXDEV, 1872f927d87SEdward Tomasz Napierala [LINUX_ENODEV] = ENODEV, 1882f927d87SEdward Tomasz Napierala 1892f927d87SEdward Tomasz Napierala /* [20, 29] */ 1902f927d87SEdward Tomasz Napierala [LINUX_ENOTDIR] = ENOTDIR, 1912f927d87SEdward Tomasz Napierala [LINUX_EISDIR] = EISDIR, 1922f927d87SEdward Tomasz Napierala [LINUX_EINVAL] = EINVAL, 1932f927d87SEdward Tomasz Napierala [LINUX_ENFILE] = ENFILE, 1942f927d87SEdward Tomasz Napierala [LINUX_EMFILE] = EMFILE, 1952f927d87SEdward Tomasz Napierala [LINUX_ENOTTY] = ENOTTY, 1962f927d87SEdward Tomasz Napierala [LINUX_ETXTBSY] = ETXTBSY, 1972f927d87SEdward Tomasz Napierala [LINUX_EFBIG] = EFBIG, 1982f927d87SEdward Tomasz Napierala [LINUX_ENOSPC] = ENOSPC, 1992f927d87SEdward Tomasz Napierala [LINUX_ESPIPE] = ESPIPE, 2002f927d87SEdward Tomasz Napierala 2012f927d87SEdward Tomasz Napierala /* [30, 39] */ 2022f927d87SEdward Tomasz Napierala [LINUX_EROFS] = EROFS, 2032f927d87SEdward Tomasz Napierala [LINUX_EMLINK] = EMLINK, 2042f927d87SEdward Tomasz Napierala [LINUX_EPIPE] = EPIPE, 2052f927d87SEdward Tomasz Napierala [LINUX_EDOM] = EDOM, 2062f927d87SEdward Tomasz Napierala [LINUX_ERANGE] = ERANGE, 2072f927d87SEdward Tomasz Napierala [LINUX_EDEADLK] = EDEADLK, 2082f927d87SEdward Tomasz Napierala [LINUX_ENAMETOOLONG] = ENAMETOOLONG, 2092f927d87SEdward Tomasz Napierala [LINUX_ENOLCK] = ENOLCK, 2102f927d87SEdward Tomasz Napierala [LINUX_ENOSYS] = ENOSYS, 2112f927d87SEdward Tomasz Napierala [LINUX_ENOTEMPTY] = ENOTEMPTY, 2122f927d87SEdward Tomasz Napierala 2132f927d87SEdward Tomasz Napierala /* [40, 49] */ 2142f927d87SEdward Tomasz Napierala [LINUX_ELOOP] = ELOOP, 2152f927d87SEdward Tomasz Napierala [41] = EINVAL, 2162f927d87SEdward Tomasz Napierala [LINUX_ENOMSG] = ENOMSG, 2172f927d87SEdward Tomasz Napierala [LINUX_EIDRM] = EIDRM, 2182f927d87SEdward Tomasz Napierala [LINUX_ECHRNG] = EINVAL, /* XXX */ 2192f927d87SEdward Tomasz Napierala [LINUX_EL2NSYNC] = EINVAL, /* XXX */ 2202f927d87SEdward Tomasz Napierala [LINUX_EL3HLT] = EINVAL, /* XXX */ 2212f927d87SEdward Tomasz Napierala [LINUX_EL3RST] = EINVAL, /* XXX */ 2222f927d87SEdward Tomasz Napierala [LINUX_ELNRNG] = EINVAL, /* XXX */ 2232f927d87SEdward Tomasz Napierala [LINUX_EUNATCH] = EINVAL, /* XXX */ 2242f927d87SEdward Tomasz Napierala 2252f927d87SEdward Tomasz Napierala /* [50, 59] */ 2262f927d87SEdward Tomasz Napierala [LINUX_ENOCSI] = EINVAL, /* XXX */ 2272f927d87SEdward Tomasz Napierala [LINUX_EL2HLT] = EINVAL, /* XXX */ 2282f927d87SEdward Tomasz Napierala [LINUX_EBADE] = EINVAL, /* XXX */ 2292f927d87SEdward Tomasz Napierala [LINUX_EBADR] = EINVAL, /* XXX */ 2302f927d87SEdward Tomasz Napierala [LINUX_EXFULL] = EINVAL, /* XXX */ 2312f927d87SEdward Tomasz Napierala [LINUX_ENOANO] = EINVAL, /* XXX */ 2322f927d87SEdward Tomasz Napierala [LINUX_EBADRQC] = EINVAL, /* XXX */ 2332f927d87SEdward Tomasz Napierala [LINUX_EBADSLT] = EINVAL, /* XXX */ 2342f927d87SEdward Tomasz Napierala [58] = EINVAL, 2352f927d87SEdward Tomasz Napierala [LINUX_EBFONT] = EINVAL, /* XXX */ 2362f927d87SEdward Tomasz Napierala 2372f927d87SEdward Tomasz Napierala /* [60, 69] */ 2382f927d87SEdward Tomasz Napierala [LINUX_ENOSTR] = EINVAL, /* XXX */ 2392f927d87SEdward Tomasz Napierala [LINUX_ENODATA] = ENOATTR, /* XXX */ 2402f927d87SEdward Tomasz Napierala [LINUX_ENOTIME] = EINVAL, /* XXX */ 2412f927d87SEdward Tomasz Napierala [LINUX_ENOSR] = EINVAL, /* XXX */ 2422f927d87SEdward Tomasz Napierala [LINUX_ENONET] = EINVAL, /* XXX */ 2432f927d87SEdward Tomasz Napierala [LINUX_ENOPKG] = EINVAL, /* XXX */ 2442f927d87SEdward Tomasz Napierala [LINUX_EREMOTE] = EREMOTE, 2452f927d87SEdward Tomasz Napierala [LINUX_ENOLINK] = ENOLINK, 2462f927d87SEdward Tomasz Napierala [LINUX_EADV] = EINVAL, /* XXX */ 2472f927d87SEdward Tomasz Napierala [LINUX_ESRMNT] = EINVAL, /* XXX */ 2482f927d87SEdward Tomasz Napierala 2492f927d87SEdward Tomasz Napierala /* [70, 79] */ 2502f927d87SEdward Tomasz Napierala [LINUX_ECOMM] = EINVAL, /* XXX */ 2512f927d87SEdward Tomasz Napierala [LINUX_EPROTO] = EPROTO, 2522f927d87SEdward Tomasz Napierala [LINUX_EMULTIHOP] = EMULTIHOP, 2532f927d87SEdward Tomasz Napierala [LINUX_EDOTDOT] = EINVAL, /* XXX */ 2542f927d87SEdward Tomasz Napierala [LINUX_EBADMSG] = EBADMSG, 2552f927d87SEdward Tomasz Napierala [LINUX_EOVERFLOW] = EOVERFLOW, 2562f927d87SEdward Tomasz Napierala [LINUX_ENOTUNIQ] = EINVAL, /* XXX */ 2572f927d87SEdward Tomasz Napierala [LINUX_EBADFD] = EBADF, /* XXX */ 2582f927d87SEdward Tomasz Napierala [LINUX_EREMCHG] = EINVAL, /* XXX */ 2592f927d87SEdward Tomasz Napierala [LINUX_ELIBACC] = EINVAL, /* XXX */ 2602f927d87SEdward Tomasz Napierala 2612f927d87SEdward Tomasz Napierala /* [80, 89] */ 2622f927d87SEdward Tomasz Napierala [LINUX_ELIBBAD] = EINVAL, /* XXX */ 2632f927d87SEdward Tomasz Napierala [LINUX_ELIBSCN] = EINVAL, /* XXX */ 2642f927d87SEdward Tomasz Napierala [LINUX_ELIBMAX] = EINVAL, /* XXX */ 2652f927d87SEdward Tomasz Napierala [LINUX_ELIBEXEC] = EINVAL, /* XXX */ 2662f927d87SEdward Tomasz Napierala [LINUX_EILSEQ] = EILSEQ, 2672f927d87SEdward Tomasz Napierala [LINUX_ERESTART] = EAGAIN, /* XXX */ 2682f927d87SEdward Tomasz Napierala [LINUX_ESTRPIPE] = EINVAL, /* XXX */ 2692f927d87SEdward Tomasz Napierala [LINUX_EUSERS] = EUSERS, 2702f927d87SEdward Tomasz Napierala [LINUX_ENOTSOCK] = ENOTSOCK, 2712f927d87SEdward Tomasz Napierala [LINUX_EDESTADDRREQ] = EDESTADDRREQ, 2722f927d87SEdward Tomasz Napierala 2732f927d87SEdward Tomasz Napierala /* [90, 99] */ 2742f927d87SEdward Tomasz Napierala [LINUX_EMSGSIZE] = EMSGSIZE, 2752f927d87SEdward Tomasz Napierala [LINUX_EPROTOTYPE] = EPROTOTYPE, 2762f927d87SEdward Tomasz Napierala [LINUX_ENOPROTOOPT] = ENOPROTOOPT, 2772f927d87SEdward Tomasz Napierala [LINUX_EPROTONOTSUPPORT] = EPROTONOSUPPORT, 2782f927d87SEdward Tomasz Napierala [LINUX_ESOCKNOTSUPPORT] = EPROTONOSUPPORT, /* XXX */ 2792f927d87SEdward Tomasz Napierala [LINUX_EOPNOTSUPPORT] = EOPNOTSUPP, 2802f927d87SEdward Tomasz Napierala [LINUX_EPFNOTSUPPORT] = EPFNOSUPPORT, 2812f927d87SEdward Tomasz Napierala [LINUX_EAFNOTSUPPORT] = EAFNOSUPPORT, 2822f927d87SEdward Tomasz Napierala [LINUX_EADDRINUSE] = EADDRINUSE, 2832f927d87SEdward Tomasz Napierala [LINUX_EADDRNOTAVAIL] = EADDRNOTAVAIL, 2842f927d87SEdward Tomasz Napierala 2852f927d87SEdward Tomasz Napierala /* [100, 109] */ 2862f927d87SEdward Tomasz Napierala [LINUX_ENETDOWN] = ENETDOWN, 2872f927d87SEdward Tomasz Napierala [LINUX_ENETUNREACH] = ENETUNREACH, 2882f927d87SEdward Tomasz Napierala [LINUX_ENETRESET] = ENETRESET, 2892f927d87SEdward Tomasz Napierala [LINUX_ECONNABORTED] = ECONNABORTED, 2902f927d87SEdward Tomasz Napierala [LINUX_ECONNRESET] = ECONNRESET, 2912f927d87SEdward Tomasz Napierala [LINUX_ENOBUFS] = ENOBUFS, 2922f927d87SEdward Tomasz Napierala [LINUX_EISCONN] = EISCONN, 2932f927d87SEdward Tomasz Napierala [LINUX_ENOTCONN] = ENOTCONN, 2942f927d87SEdward Tomasz Napierala [LINUX_ESHUTDOWN] = ESHUTDOWN, 2952f927d87SEdward Tomasz Napierala [LINUX_ETOOMANYREFS] = ETOOMANYREFS, 2962f927d87SEdward Tomasz Napierala 2972f927d87SEdward Tomasz Napierala /* [110, 119] */ 2982f927d87SEdward Tomasz Napierala [LINUX_ETIMEDOUT] = ETIMEDOUT, 2992f927d87SEdward Tomasz Napierala [LINUX_ECONNREFUSED] = ECONNREFUSED, 3002f927d87SEdward Tomasz Napierala [LINUX_EHOSTDOWN] = EHOSTDOWN, 3012f927d87SEdward Tomasz Napierala [LINUX_EHOSTUNREACH] = EHOSTUNREACH, 3022f927d87SEdward Tomasz Napierala [LINUX_EALREADY] = EALREADY, 3032f927d87SEdward Tomasz Napierala [LINUX_EINPROGRESS] = EINPROGRESS, 3042f927d87SEdward Tomasz Napierala [LINUX_ESTALE] = ESTALE, 3052f927d87SEdward Tomasz Napierala [LINUX_EUCLEAN] = EINVAL, /* XXX */ 3062f927d87SEdward Tomasz Napierala [LINUX_ENOTNAM] = EINVAL, /* XXX */ 3072f927d87SEdward Tomasz Napierala [LINUX_ENAVAIL] = EINVAL, /* XXX */ 3082f927d87SEdward Tomasz Napierala 3092f927d87SEdward Tomasz Napierala /* [120, 129] */ 3102f927d87SEdward Tomasz Napierala [LINUX_EISNAM] = EINVAL, /* XXX */ 3112f927d87SEdward Tomasz Napierala [LINUX_EREMOTEIO] = EINVAL, /* XXX */ 3122f927d87SEdward Tomasz Napierala [LINUX_EDQUOT] = EDQUOT, 3132f927d87SEdward Tomasz Napierala [LINUX_ENOMEDIUM] = EIO, /* XXX */ 3142f927d87SEdward Tomasz Napierala [LINUX_EMEDIUMTYPE] = EIO, /* XXX */ 3152f927d87SEdward Tomasz Napierala [LINUX_ECANCELED] = ECANCELED, 3162f927d87SEdward Tomasz Napierala [LINUX_ENOKEY] = EIO, /* XXX */ 3172f927d87SEdward Tomasz Napierala [LINUX_EKEYEXPIRED] = EIO, /* XXX */ 3182f927d87SEdward Tomasz Napierala [LINUX_EKEYREVOKED] = EIO, /* XXX */ 3192f927d87SEdward Tomasz Napierala [LINUX_EKEYREJECTED] = EIO, /* XXX */ 3202f927d87SEdward Tomasz Napierala 3212f927d87SEdward Tomasz Napierala /* [130, 139] */ 3222f927d87SEdward Tomasz Napierala [LINUX_EOWNERDEAD] = EOWNERDEAD, 3232f927d87SEdward Tomasz Napierala [LINUX_ENOTRECOVERABLE] = ENOTRECOVERABLE, 3242f927d87SEdward Tomasz Napierala [LINUX_ERFKILL] = ENETDOWN, /* XXX */ 3252f927d87SEdward Tomasz Napierala [LINUX_EHWPOISON] = EINVAL, /* XXX */ 3262f927d87SEdward Tomasz Napierala}; 3272f927d87SEdward Tomasz Napierala 3282f927d87SEdward Tomasz Napierala_Static_assert(LINUX_ELAST == 133, 3292f927d87SEdward Tomasz Napierala "missing errno entries in linux_to_bsd_errtbl"); 330