158f0484fSRodney W. Grimes /* 258f0484fSRodney W. Grimes * Copyright (c) 1982, 1985, 1993 358f0484fSRodney W. Grimes * The Regents of the University of California. All rights reserved. 458f0484fSRodney W. Grimes * 558f0484fSRodney W. Grimes * Redistribution and use in source and binary forms, with or without 658f0484fSRodney W. Grimes * modification, are permitted provided that the following conditions 758f0484fSRodney W. Grimes * are met: 858f0484fSRodney W. Grimes * 1. Redistributions of source code must retain the above copyright 958f0484fSRodney W. Grimes * notice, this list of conditions and the following disclaimer. 1058f0484fSRodney W. Grimes * 2. Redistributions in binary form must reproduce the above copyright 1158f0484fSRodney W. Grimes * notice, this list of conditions and the following disclaimer in the 1258f0484fSRodney W. Grimes * documentation and/or other materials provided with the distribution. 1358f0484fSRodney W. Grimes * 3. All advertising materials mentioning features or use of this software 1458f0484fSRodney W. Grimes * must display the following acknowledgement: 1558f0484fSRodney W. Grimes * This product includes software developed by the University of 1658f0484fSRodney W. Grimes * California, Berkeley and its contributors. 1758f0484fSRodney W. Grimes * 4. Neither the name of the University nor the names of its contributors 1858f0484fSRodney W. Grimes * may be used to endorse or promote products derived from this software 1958f0484fSRodney W. Grimes * without specific prior written permission. 2058f0484fSRodney W. Grimes * 2158f0484fSRodney W. Grimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2258f0484fSRodney W. Grimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2358f0484fSRodney W. Grimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2458f0484fSRodney W. Grimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2558f0484fSRodney W. Grimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2658f0484fSRodney W. Grimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2758f0484fSRodney W. Grimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2858f0484fSRodney W. Grimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2958f0484fSRodney W. Grimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3058f0484fSRodney W. Grimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3158f0484fSRodney W. Grimes * SUCH DAMAGE. 3258f0484fSRodney W. Grimes */ 3358f0484fSRodney W. Grimes 3458f0484fSRodney W. Grimes #if defined(LIBC_SCCS) && !defined(lint) 3558f0484fSRodney W. Grimes static char sccsid[] = "@(#)errlst.c 8.2 (Berkeley) 11/16/93"; 3658f0484fSRodney W. Grimes #endif /* LIBC_SCCS and not lint */ 37333fc21eSDavid E. O'Brien #include <sys/cdefs.h> 38333fc21eSDavid E. O'Brien __FBSDID("$FreeBSD$"); 3958f0484fSRodney W. Grimes 4058f0484fSRodney W. Grimes #include <stdio.h> 4158f0484fSRodney W. Grimes 4258f0484fSRodney W. Grimes const char *const sys_errlist[] = { 4358f0484fSRodney W. Grimes "Undefined error: 0", /* 0 - ENOERROR */ 4458f0484fSRodney W. Grimes "Operation not permitted", /* 1 - EPERM */ 4558f0484fSRodney W. Grimes "No such file or directory", /* 2 - ENOENT */ 4658f0484fSRodney W. Grimes "No such process", /* 3 - ESRCH */ 4758f0484fSRodney W. Grimes "Interrupted system call", /* 4 - EINTR */ 4858f0484fSRodney W. Grimes "Input/output error", /* 5 - EIO */ 4958f0484fSRodney W. Grimes "Device not configured", /* 6 - ENXIO */ 5058f0484fSRodney W. Grimes "Argument list too long", /* 7 - E2BIG */ 5158f0484fSRodney W. Grimes "Exec format error", /* 8 - ENOEXEC */ 5258f0484fSRodney W. Grimes "Bad file descriptor", /* 9 - EBADF */ 5358f0484fSRodney W. Grimes "No child processes", /* 10 - ECHILD */ 5458f0484fSRodney W. Grimes "Resource deadlock avoided", /* 11 - EDEADLK */ 5558f0484fSRodney W. Grimes "Cannot allocate memory", /* 12 - ENOMEM */ 5658f0484fSRodney W. Grimes "Permission denied", /* 13 - EACCES */ 5758f0484fSRodney W. Grimes "Bad address", /* 14 - EFAULT */ 5858f0484fSRodney W. Grimes "Block device required", /* 15 - ENOTBLK */ 5958f0484fSRodney W. Grimes "Device busy", /* 16 - EBUSY */ 6058f0484fSRodney W. Grimes "File exists", /* 17 - EEXIST */ 6158f0484fSRodney W. Grimes "Cross-device link", /* 18 - EXDEV */ 6258f0484fSRodney W. Grimes "Operation not supported by device", /* 19 - ENODEV */ 6358f0484fSRodney W. Grimes "Not a directory", /* 20 - ENOTDIR */ 6458f0484fSRodney W. Grimes "Is a directory", /* 21 - EISDIR */ 6558f0484fSRodney W. Grimes "Invalid argument", /* 22 - EINVAL */ 6658f0484fSRodney W. Grimes "Too many open files in system", /* 23 - ENFILE */ 6758f0484fSRodney W. Grimes "Too many open files", /* 24 - EMFILE */ 6858f0484fSRodney W. Grimes "Inappropriate ioctl for device", /* 25 - ENOTTY */ 6958f0484fSRodney W. Grimes "Text file busy", /* 26 - ETXTBSY */ 7058f0484fSRodney W. Grimes "File too large", /* 27 - EFBIG */ 7158f0484fSRodney W. Grimes "No space left on device", /* 28 - ENOSPC */ 7258f0484fSRodney W. Grimes "Illegal seek", /* 29 - ESPIPE */ 7358f0484fSRodney W. Grimes "Read-only file system", /* 30 - EROFS */ 7458f0484fSRodney W. Grimes "Too many links", /* 31 - EMLINK */ 7558f0484fSRodney W. Grimes "Broken pipe", /* 32 - EPIPE */ 7658f0484fSRodney W. Grimes 7758f0484fSRodney W. Grimes /* math software */ 7858f0484fSRodney W. Grimes "Numerical argument out of domain", /* 33 - EDOM */ 7958f0484fSRodney W. Grimes "Result too large", /* 34 - ERANGE */ 8058f0484fSRodney W. Grimes 8158f0484fSRodney W. Grimes /* non-blocking and interrupt i/o */ 8258f0484fSRodney W. Grimes "Resource temporarily unavailable", /* 35 - EAGAIN */ 8358f0484fSRodney W. Grimes /* 35 - EWOULDBLOCK */ 8458f0484fSRodney W. Grimes "Operation now in progress", /* 36 - EINPROGRESS */ 8558f0484fSRodney W. Grimes "Operation already in progress", /* 37 - EALREADY */ 8658f0484fSRodney W. Grimes 8758f0484fSRodney W. Grimes /* ipc/network software -- argument errors */ 8858f0484fSRodney W. Grimes "Socket operation on non-socket", /* 38 - ENOTSOCK */ 8958f0484fSRodney W. Grimes "Destination address required", /* 39 - EDESTADDRREQ */ 9058f0484fSRodney W. Grimes "Message too long", /* 40 - EMSGSIZE */ 9158f0484fSRodney W. Grimes "Protocol wrong type for socket", /* 41 - EPROTOTYPE */ 9258f0484fSRodney W. Grimes "Protocol not available", /* 42 - ENOPROTOOPT */ 9358f0484fSRodney W. Grimes "Protocol not supported", /* 43 - EPROTONOSUPPORT */ 9458f0484fSRodney W. Grimes "Socket type not supported", /* 44 - ESOCKTNOSUPPORT */ 9558f0484fSRodney W. Grimes "Operation not supported", /* 45 - EOPNOTSUPP */ 9658f0484fSRodney W. Grimes "Protocol family not supported", /* 46 - EPFNOSUPPORT */ 9758f0484fSRodney W. Grimes /* 47 - EAFNOSUPPORT */ 9858f0484fSRodney W. Grimes "Address family not supported by protocol family", 9958f0484fSRodney W. Grimes "Address already in use", /* 48 - EADDRINUSE */ 10058f0484fSRodney W. Grimes "Can't assign requested address", /* 49 - EADDRNOTAVAIL */ 10158f0484fSRodney W. Grimes 10258f0484fSRodney W. Grimes /* ipc/network software -- operational errors */ 10358f0484fSRodney W. Grimes "Network is down", /* 50 - ENETDOWN */ 10458f0484fSRodney W. Grimes "Network is unreachable", /* 51 - ENETUNREACH */ 10558f0484fSRodney W. Grimes "Network dropped connection on reset", /* 52 - ENETRESET */ 10658f0484fSRodney W. Grimes "Software caused connection abort", /* 53 - ECONNABORTED */ 10758f0484fSRodney W. Grimes "Connection reset by peer", /* 54 - ECONNRESET */ 10858f0484fSRodney W. Grimes "No buffer space available", /* 55 - ENOBUFS */ 10958f0484fSRodney W. Grimes "Socket is already connected", /* 56 - EISCONN */ 11058f0484fSRodney W. Grimes "Socket is not connected", /* 57 - ENOTCONN */ 11158f0484fSRodney W. Grimes "Can't send after socket shutdown", /* 58 - ESHUTDOWN */ 11258f0484fSRodney W. Grimes "Too many references: can't splice", /* 59 - ETOOMANYREFS */ 11358f0484fSRodney W. Grimes "Operation timed out", /* 60 - ETIMEDOUT */ 11458f0484fSRodney W. Grimes "Connection refused", /* 61 - ECONNREFUSED */ 11558f0484fSRodney W. Grimes 11658f0484fSRodney W. Grimes "Too many levels of symbolic links", /* 62 - ELOOP */ 11758f0484fSRodney W. Grimes "File name too long", /* 63 - ENAMETOOLONG */ 11858f0484fSRodney W. Grimes 11958f0484fSRodney W. Grimes /* should be rearranged */ 12058f0484fSRodney W. Grimes "Host is down", /* 64 - EHOSTDOWN */ 12158f0484fSRodney W. Grimes "No route to host", /* 65 - EHOSTUNREACH */ 12258f0484fSRodney W. Grimes "Directory not empty", /* 66 - ENOTEMPTY */ 12358f0484fSRodney W. Grimes 12458f0484fSRodney W. Grimes /* quotas & mush */ 12558f0484fSRodney W. Grimes "Too many processes", /* 67 - EPROCLIM */ 12658f0484fSRodney W. Grimes "Too many users", /* 68 - EUSERS */ 12758f0484fSRodney W. Grimes "Disc quota exceeded", /* 69 - EDQUOT */ 12858f0484fSRodney W. Grimes 12958f0484fSRodney W. Grimes /* Network File System */ 13058f0484fSRodney W. Grimes "Stale NFS file handle", /* 70 - ESTALE */ 13158f0484fSRodney W. Grimes "Too many levels of remote in path", /* 71 - EREMOTE */ 13258f0484fSRodney W. Grimes "RPC struct is bad", /* 72 - EBADRPC */ 13358f0484fSRodney W. Grimes "RPC version wrong", /* 73 - ERPCMISMATCH */ 13458f0484fSRodney W. Grimes "RPC prog. not avail", /* 74 - EPROGUNAVAIL */ 13558f0484fSRodney W. Grimes "Program version wrong", /* 75 - EPROGMISMATCH */ 13658f0484fSRodney W. Grimes "Bad procedure for program", /* 76 - EPROCUNAVAIL */ 13758f0484fSRodney W. Grimes 13858f0484fSRodney W. Grimes "No locks available", /* 77 - ENOLCK */ 13958f0484fSRodney W. Grimes "Function not implemented", /* 78 - ENOSYS */ 14058f0484fSRodney W. Grimes "Inappropriate file type or format", /* 79 - EFTYPE */ 14100c7dcf6SPoul-Henning Kamp "Authentication error", /* 80 - EAUTH */ 14200c7dcf6SPoul-Henning Kamp "Need authenticator", /* 81 - ENEEDAUTH */ 14300c7dcf6SPoul-Henning Kamp "Identifier removed", /* 82 - EIDRM */ 14400c7dcf6SPoul-Henning Kamp "No message of desired type", /* 83 - ENOMSG */ 14500c7dcf6SPoul-Henning Kamp "Value too large to be stored in data type", /* 84 - EOVERFLOW */ 14600c7dcf6SPoul-Henning Kamp "Operation canceled", /* 85 - ECANCELED */ 14700c7dcf6SPoul-Henning Kamp "Illegal byte sequence", /* 86 - EILSEQ */ 1489d9737ecSBrian Feldman "Attribute not found", /* 87 - ENOATTR */ 1499d6d1ee6SPoul-Henning Kamp 1509d6d1ee6SPoul-Henning Kamp /* General */ 1519d6d1ee6SPoul-Henning Kamp "Programming error", /* 88 - EDOFUS */ 15258f0484fSRodney W. Grimes }; 15358f0484fSRodney W. Grimes int errno; 15458f0484fSRodney W. Grimes const int sys_nerr = sizeof(sys_errlist) / sizeof(sys_errlist[0]); 155