11ac2776bSEd Maste/*- 21ac2776bSEd Maste * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 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"); 163*2f927d87SEdward Tomasz Napierala 164*2f927d87SEdward Tomasz Napieralastatic const int linux_to_bsd_errtbl[LINUX_ELAST + 1] = { 165*2f927d87SEdward Tomasz Napierala /* [0, 9] */ 166*2f927d87SEdward Tomasz Napierala [0] = 0, 167*2f927d87SEdward Tomasz Napierala [LINUX_EPERM] = EPERM, 168*2f927d87SEdward Tomasz Napierala [LINUX_ENOENT] = ENOENT, 169*2f927d87SEdward Tomasz Napierala [LINUX_ESRCH] = ESRCH, 170*2f927d87SEdward Tomasz Napierala [LINUX_EINTR] = EINTR, 171*2f927d87SEdward Tomasz Napierala [LINUX_EIO] = EIO, 172*2f927d87SEdward Tomasz Napierala [LINUX_ENXIO] = ENXIO, 173*2f927d87SEdward Tomasz Napierala [LINUX_E2BIG] = E2BIG, 174*2f927d87SEdward Tomasz Napierala [LINUX_ENOEXEC] = ENOENT, 175*2f927d87SEdward Tomasz Napierala [LINUX_EBADF] = EBADF, 176*2f927d87SEdward Tomasz Napierala 177*2f927d87SEdward Tomasz Napierala /* [10, 19] */ 178*2f927d87SEdward Tomasz Napierala [LINUX_ECHILD] = ECHILD, 179*2f927d87SEdward Tomasz Napierala [LINUX_EAGAIN] = EAGAIN, 180*2f927d87SEdward Tomasz Napierala [LINUX_ENOMEM] = ENOMEM, 181*2f927d87SEdward Tomasz Napierala [LINUX_EACCES] = EACCES, 182*2f927d87SEdward Tomasz Napierala [LINUX_EFAULT] = EFAULT, 183*2f927d87SEdward Tomasz Napierala [LINUX_ENOTBLK] = ENOTBLK, 184*2f927d87SEdward Tomasz Napierala [LINUX_EBUSY] = EBUSY, 185*2f927d87SEdward Tomasz Napierala [LINUX_EEXIST] = EEXIST, 186*2f927d87SEdward Tomasz Napierala [LINUX_EXDEV] = EXDEV, 187*2f927d87SEdward Tomasz Napierala [LINUX_ENODEV] = ENODEV, 188*2f927d87SEdward Tomasz Napierala 189*2f927d87SEdward Tomasz Napierala /* [20, 29] */ 190*2f927d87SEdward Tomasz Napierala [LINUX_ENOTDIR] = ENOTDIR, 191*2f927d87SEdward Tomasz Napierala [LINUX_EISDIR] = EISDIR, 192*2f927d87SEdward Tomasz Napierala [LINUX_EINVAL] = EINVAL, 193*2f927d87SEdward Tomasz Napierala [LINUX_ENFILE] = ENFILE, 194*2f927d87SEdward Tomasz Napierala [LINUX_EMFILE] = EMFILE, 195*2f927d87SEdward Tomasz Napierala [LINUX_ENOTTY] = ENOTTY, 196*2f927d87SEdward Tomasz Napierala [LINUX_ETXTBSY] = ETXTBSY, 197*2f927d87SEdward Tomasz Napierala [LINUX_EFBIG] = EFBIG, 198*2f927d87SEdward Tomasz Napierala [LINUX_ENOSPC] = ENOSPC, 199*2f927d87SEdward Tomasz Napierala [LINUX_ESPIPE] = ESPIPE, 200*2f927d87SEdward Tomasz Napierala 201*2f927d87SEdward Tomasz Napierala /* [30, 39] */ 202*2f927d87SEdward Tomasz Napierala [LINUX_EROFS] = EROFS, 203*2f927d87SEdward Tomasz Napierala [LINUX_EMLINK] = EMLINK, 204*2f927d87SEdward Tomasz Napierala [LINUX_EPIPE] = EPIPE, 205*2f927d87SEdward Tomasz Napierala [LINUX_EDOM] = EDOM, 206*2f927d87SEdward Tomasz Napierala [LINUX_ERANGE] = ERANGE, 207*2f927d87SEdward Tomasz Napierala [LINUX_EDEADLK] = EDEADLK, 208*2f927d87SEdward Tomasz Napierala [LINUX_ENAMETOOLONG] = ENAMETOOLONG, 209*2f927d87SEdward Tomasz Napierala [LINUX_ENOLCK] = ENOLCK, 210*2f927d87SEdward Tomasz Napierala [LINUX_ENOSYS] = ENOSYS, 211*2f927d87SEdward Tomasz Napierala [LINUX_ENOTEMPTY] = ENOTEMPTY, 212*2f927d87SEdward Tomasz Napierala 213*2f927d87SEdward Tomasz Napierala /* [40, 49] */ 214*2f927d87SEdward Tomasz Napierala [LINUX_ELOOP] = ELOOP, 215*2f927d87SEdward Tomasz Napierala [41] = EINVAL, 216*2f927d87SEdward Tomasz Napierala [LINUX_ENOMSG] = ENOMSG, 217*2f927d87SEdward Tomasz Napierala [LINUX_EIDRM] = EIDRM, 218*2f927d87SEdward Tomasz Napierala [LINUX_ECHRNG] = EINVAL, /* XXX */ 219*2f927d87SEdward Tomasz Napierala [LINUX_EL2NSYNC] = EINVAL, /* XXX */ 220*2f927d87SEdward Tomasz Napierala [LINUX_EL3HLT] = EINVAL, /* XXX */ 221*2f927d87SEdward Tomasz Napierala [LINUX_EL3RST] = EINVAL, /* XXX */ 222*2f927d87SEdward Tomasz Napierala [LINUX_ELNRNG] = EINVAL, /* XXX */ 223*2f927d87SEdward Tomasz Napierala [LINUX_EUNATCH] = EINVAL, /* XXX */ 224*2f927d87SEdward Tomasz Napierala 225*2f927d87SEdward Tomasz Napierala /* [50, 59] */ 226*2f927d87SEdward Tomasz Napierala [LINUX_ENOCSI] = EINVAL, /* XXX */ 227*2f927d87SEdward Tomasz Napierala [LINUX_EL2HLT] = EINVAL, /* XXX */ 228*2f927d87SEdward Tomasz Napierala [LINUX_EBADE] = EINVAL, /* XXX */ 229*2f927d87SEdward Tomasz Napierala [LINUX_EBADR] = EINVAL, /* XXX */ 230*2f927d87SEdward Tomasz Napierala [LINUX_EXFULL] = EINVAL, /* XXX */ 231*2f927d87SEdward Tomasz Napierala [LINUX_ENOANO] = EINVAL, /* XXX */ 232*2f927d87SEdward Tomasz Napierala [LINUX_EBADRQC] = EINVAL, /* XXX */ 233*2f927d87SEdward Tomasz Napierala [LINUX_EBADSLT] = EINVAL, /* XXX */ 234*2f927d87SEdward Tomasz Napierala [58] = EINVAL, 235*2f927d87SEdward Tomasz Napierala [LINUX_EBFONT] = EINVAL, /* XXX */ 236*2f927d87SEdward Tomasz Napierala 237*2f927d87SEdward Tomasz Napierala /* [60, 69] */ 238*2f927d87SEdward Tomasz Napierala [LINUX_ENOSTR] = EINVAL, /* XXX */ 239*2f927d87SEdward Tomasz Napierala [LINUX_ENODATA] = ENOATTR, /* XXX */ 240*2f927d87SEdward Tomasz Napierala [LINUX_ENOTIME] = EINVAL, /* XXX */ 241*2f927d87SEdward Tomasz Napierala [LINUX_ENOSR] = EINVAL, /* XXX */ 242*2f927d87SEdward Tomasz Napierala [LINUX_ENONET] = EINVAL, /* XXX */ 243*2f927d87SEdward Tomasz Napierala [LINUX_ENOPKG] = EINVAL, /* XXX */ 244*2f927d87SEdward Tomasz Napierala [LINUX_EREMOTE] = EREMOTE, 245*2f927d87SEdward Tomasz Napierala [LINUX_ENOLINK] = ENOLINK, 246*2f927d87SEdward Tomasz Napierala [LINUX_EADV] = EINVAL, /* XXX */ 247*2f927d87SEdward Tomasz Napierala [LINUX_ESRMNT] = EINVAL, /* XXX */ 248*2f927d87SEdward Tomasz Napierala 249*2f927d87SEdward Tomasz Napierala /* [70, 79] */ 250*2f927d87SEdward Tomasz Napierala [LINUX_ECOMM] = EINVAL, /* XXX */ 251*2f927d87SEdward Tomasz Napierala [LINUX_EPROTO] = EPROTO, 252*2f927d87SEdward Tomasz Napierala [LINUX_EMULTIHOP] = EMULTIHOP, 253*2f927d87SEdward Tomasz Napierala [LINUX_EDOTDOT] = EINVAL, /* XXX */ 254*2f927d87SEdward Tomasz Napierala [LINUX_EBADMSG] = EBADMSG, 255*2f927d87SEdward Tomasz Napierala [LINUX_EOVERFLOW] = EOVERFLOW, 256*2f927d87SEdward Tomasz Napierala [LINUX_ENOTUNIQ] = EINVAL, /* XXX */ 257*2f927d87SEdward Tomasz Napierala [LINUX_EBADFD] = EBADF, /* XXX */ 258*2f927d87SEdward Tomasz Napierala [LINUX_EREMCHG] = EINVAL, /* XXX */ 259*2f927d87SEdward Tomasz Napierala [LINUX_ELIBACC] = EINVAL, /* XXX */ 260*2f927d87SEdward Tomasz Napierala 261*2f927d87SEdward Tomasz Napierala /* [80, 89] */ 262*2f927d87SEdward Tomasz Napierala [LINUX_ELIBBAD] = EINVAL, /* XXX */ 263*2f927d87SEdward Tomasz Napierala [LINUX_ELIBSCN] = EINVAL, /* XXX */ 264*2f927d87SEdward Tomasz Napierala [LINUX_ELIBMAX] = EINVAL, /* XXX */ 265*2f927d87SEdward Tomasz Napierala [LINUX_ELIBEXEC] = EINVAL, /* XXX */ 266*2f927d87SEdward Tomasz Napierala [LINUX_EILSEQ] = EILSEQ, 267*2f927d87SEdward Tomasz Napierala [LINUX_ERESTART] = EAGAIN, /* XXX */ 268*2f927d87SEdward Tomasz Napierala [LINUX_ESTRPIPE] = EINVAL, /* XXX */ 269*2f927d87SEdward Tomasz Napierala [LINUX_EUSERS] = EUSERS, 270*2f927d87SEdward Tomasz Napierala [LINUX_ENOTSOCK] = ENOTSOCK, 271*2f927d87SEdward Tomasz Napierala [LINUX_EDESTADDRREQ] = EDESTADDRREQ, 272*2f927d87SEdward Tomasz Napierala 273*2f927d87SEdward Tomasz Napierala /* [90, 99] */ 274*2f927d87SEdward Tomasz Napierala [LINUX_EMSGSIZE] = EMSGSIZE, 275*2f927d87SEdward Tomasz Napierala [LINUX_EPROTOTYPE] = EPROTOTYPE, 276*2f927d87SEdward Tomasz Napierala [LINUX_ENOPROTOOPT] = ENOPROTOOPT, 277*2f927d87SEdward Tomasz Napierala [LINUX_EPROTONOTSUPPORT] = EPROTONOSUPPORT, 278*2f927d87SEdward Tomasz Napierala [LINUX_ESOCKNOTSUPPORT] = EPROTONOSUPPORT, /* XXX */ 279*2f927d87SEdward Tomasz Napierala [LINUX_EOPNOTSUPPORT] = EOPNOTSUPP, 280*2f927d87SEdward Tomasz Napierala [LINUX_EPFNOTSUPPORT] = EPFNOSUPPORT, 281*2f927d87SEdward Tomasz Napierala [LINUX_EAFNOTSUPPORT] = EAFNOSUPPORT, 282*2f927d87SEdward Tomasz Napierala [LINUX_EADDRINUSE] = EADDRINUSE, 283*2f927d87SEdward Tomasz Napierala [LINUX_EADDRNOTAVAIL] = EADDRNOTAVAIL, 284*2f927d87SEdward Tomasz Napierala 285*2f927d87SEdward Tomasz Napierala /* [100, 109] */ 286*2f927d87SEdward Tomasz Napierala [LINUX_ENETDOWN] = ENETDOWN, 287*2f927d87SEdward Tomasz Napierala [LINUX_ENETUNREACH] = ENETUNREACH, 288*2f927d87SEdward Tomasz Napierala [LINUX_ENETRESET] = ENETRESET, 289*2f927d87SEdward Tomasz Napierala [LINUX_ECONNABORTED] = ECONNABORTED, 290*2f927d87SEdward Tomasz Napierala [LINUX_ECONNRESET] = ECONNRESET, 291*2f927d87SEdward Tomasz Napierala [LINUX_ENOBUFS] = ENOBUFS, 292*2f927d87SEdward Tomasz Napierala [LINUX_EISCONN] = EISCONN, 293*2f927d87SEdward Tomasz Napierala [LINUX_ENOTCONN] = ENOTCONN, 294*2f927d87SEdward Tomasz Napierala [LINUX_ESHUTDOWN] = ESHUTDOWN, 295*2f927d87SEdward Tomasz Napierala [LINUX_ETOOMANYREFS] = ETOOMANYREFS, 296*2f927d87SEdward Tomasz Napierala 297*2f927d87SEdward Tomasz Napierala /* [110, 119] */ 298*2f927d87SEdward Tomasz Napierala [LINUX_ETIMEDOUT] = ETIMEDOUT, 299*2f927d87SEdward Tomasz Napierala [LINUX_ECONNREFUSED] = ECONNREFUSED, 300*2f927d87SEdward Tomasz Napierala [LINUX_EHOSTDOWN] = EHOSTDOWN, 301*2f927d87SEdward Tomasz Napierala [LINUX_EHOSTUNREACH] = EHOSTUNREACH, 302*2f927d87SEdward Tomasz Napierala [LINUX_EALREADY] = EALREADY, 303*2f927d87SEdward Tomasz Napierala [LINUX_EINPROGRESS] = EINPROGRESS, 304*2f927d87SEdward Tomasz Napierala [LINUX_ESTALE] = ESTALE, 305*2f927d87SEdward Tomasz Napierala [LINUX_EUCLEAN] = EINVAL, /* XXX */ 306*2f927d87SEdward Tomasz Napierala [LINUX_ENOTNAM] = EINVAL, /* XXX */ 307*2f927d87SEdward Tomasz Napierala [LINUX_ENAVAIL] = EINVAL, /* XXX */ 308*2f927d87SEdward Tomasz Napierala 309*2f927d87SEdward Tomasz Napierala /* [120, 129] */ 310*2f927d87SEdward Tomasz Napierala [LINUX_EISNAM] = EINVAL, /* XXX */ 311*2f927d87SEdward Tomasz Napierala [LINUX_EREMOTEIO] = EINVAL, /* XXX */ 312*2f927d87SEdward Tomasz Napierala [LINUX_EDQUOT] = EDQUOT, 313*2f927d87SEdward Tomasz Napierala [LINUX_ENOMEDIUM] = EIO, /* XXX */ 314*2f927d87SEdward Tomasz Napierala [LINUX_EMEDIUMTYPE] = EIO, /* XXX */ 315*2f927d87SEdward Tomasz Napierala [LINUX_ECANCELED] = ECANCELED, 316*2f927d87SEdward Tomasz Napierala [LINUX_ENOKEY] = EIO, /* XXX */ 317*2f927d87SEdward Tomasz Napierala [LINUX_EKEYEXPIRED] = EIO, /* XXX */ 318*2f927d87SEdward Tomasz Napierala [LINUX_EKEYREVOKED] = EIO, /* XXX */ 319*2f927d87SEdward Tomasz Napierala [LINUX_EKEYREJECTED] = EIO, /* XXX */ 320*2f927d87SEdward Tomasz Napierala 321*2f927d87SEdward Tomasz Napierala /* [130, 139] */ 322*2f927d87SEdward Tomasz Napierala [LINUX_EOWNERDEAD] = EOWNERDEAD, 323*2f927d87SEdward Tomasz Napierala [LINUX_ENOTRECOVERABLE] = ENOTRECOVERABLE, 324*2f927d87SEdward Tomasz Napierala [LINUX_ERFKILL] = ENETDOWN, /* XXX */ 325*2f927d87SEdward Tomasz Napierala [LINUX_EHWPOISON] = EINVAL, /* XXX */ 326*2f927d87SEdward Tomasz Napierala}; 327*2f927d87SEdward Tomasz Napierala 328*2f927d87SEdward Tomasz Napierala_Static_assert(LINUX_ELAST == 133, 329*2f927d87SEdward Tomasz Napierala "missing errno entries in linux_to_bsd_errtbl"); 330