1 /* 2 * Copyright (c) 1982, 1985, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 3. All advertising materials mentioning features or use of this software 14 * must display the following acknowledgement: 15 * This product includes software developed by the University of 16 * California, Berkeley and its contributors. 17 * 4. Neither the name of the University nor the names of its contributors 18 * may be used to endorse or promote products derived from this software 19 * without specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34 #if defined(LIBC_SCCS) && !defined(lint) 35 static char *rcsid = "$OpenBSD: errlist.c,v 1.3 1996/09/15 09:30:59 tholo Exp $"; 36 #endif /* LIBC_SCCS and not lint */ 37 38 #ifdef lint 39 char * 40 #else 41 const char *const 42 #endif 43 _sys_errlist[] = { 44 "Undefined error: 0", /* 0 - ENOERROR */ 45 "Operation not permitted", /* 1 - EPERM */ 46 "No such file or directory", /* 2 - ENOENT */ 47 "No such process", /* 3 - ESRCH */ 48 "Interrupted system call", /* 4 - EINTR */ 49 "Input/output error", /* 5 - EIO */ 50 "Device not configured", /* 6 - ENXIO */ 51 "Argument list too long", /* 7 - E2BIG */ 52 "Exec format error", /* 8 - ENOEXEC */ 53 "Bad file descriptor", /* 9 - EBADF */ 54 "No child processes", /* 10 - ECHILD */ 55 "Resource deadlock avoided", /* 11 - EDEADLK */ 56 "Cannot allocate memory", /* 12 - ENOMEM */ 57 "Permission denied", /* 13 - EACCES */ 58 "Bad address", /* 14 - EFAULT */ 59 "Block device required", /* 15 - ENOTBLK */ 60 "Device busy", /* 16 - EBUSY */ 61 "File exists", /* 17 - EEXIST */ 62 "Cross-device link", /* 18 - EXDEV */ 63 "Operation not supported by device", /* 19 - ENODEV */ 64 "Not a directory", /* 20 - ENOTDIR */ 65 "Is a directory", /* 21 - EISDIR */ 66 "Invalid argument", /* 22 - EINVAL */ 67 "Too many open files in system", /* 23 - ENFILE */ 68 "Too many open files", /* 24 - EMFILE */ 69 "Inappropriate ioctl for device", /* 25 - ENOTTY */ 70 "Text file busy", /* 26 - ETXTBSY */ 71 "File too large", /* 27 - EFBIG */ 72 "No space left on device", /* 28 - ENOSPC */ 73 "Illegal seek", /* 29 - ESPIPE */ 74 "Read-only file system", /* 30 - EROFS */ 75 "Too many links", /* 31 - EMLINK */ 76 "Broken pipe", /* 32 - EPIPE */ 77 78 /* math software */ 79 "Numerical argument out of domain", /* 33 - EDOM */ 80 "Result too large", /* 34 - ERANGE */ 81 82 /* non-blocking and interrupt i/o */ 83 "Resource temporarily unavailable", /* 35 - EAGAIN */ 84 /* 35 - EWOULDBLOCK */ 85 "Operation now in progress", /* 36 - EINPROGRESS */ 86 "Operation already in progress", /* 37 - EALREADY */ 87 88 /* ipc/network software -- argument errors */ 89 "Socket operation on non-socket", /* 38 - ENOTSOCK */ 90 "Destination address required", /* 39 - EDESTADDRREQ */ 91 "Message too long", /* 40 - EMSGSIZE */ 92 "Protocol wrong type for socket", /* 41 - EPROTOTYPE */ 93 "Protocol not available", /* 42 - ENOPROTOOPT */ 94 "Protocol not supported", /* 43 - EPROTONOSUPPORT */ 95 "Socket type not supported", /* 44 - ESOCKTNOSUPPORT */ 96 "Operation not supported", /* 45 - EOPNOTSUPP */ 97 "Protocol family not supported", /* 46 - EPFNOSUPPORT */ 98 /* 47 - EAFNOSUPPORT */ 99 "Address family not supported by protocol family", 100 "Address already in use", /* 48 - EADDRINUSE */ 101 "Can't assign requested address", /* 49 - EADDRNOTAVAIL */ 102 103 /* ipc/network software -- operational errors */ 104 "Network is down", /* 50 - ENETDOWN */ 105 "Network is unreachable", /* 51 - ENETUNREACH */ 106 "Network dropped connection on reset", /* 52 - ENETRESET */ 107 "Software caused connection abort", /* 53 - ECONNABORTED */ 108 "Connection reset by peer", /* 54 - ECONNRESET */ 109 "No buffer space available", /* 55 - ENOBUFS */ 110 "Socket is already connected", /* 56 - EISCONN */ 111 "Socket is not connected", /* 57 - ENOTCONN */ 112 "Can't send after socket shutdown", /* 58 - ESHUTDOWN */ 113 "Too many references: can't splice", /* 59 - ETOOMANYREFS */ 114 "Operation timed out", /* 60 - ETIMEDOUT */ 115 "Connection refused", /* 61 - ECONNREFUSED */ 116 117 "Too many levels of symbolic links", /* 62 - ELOOP */ 118 "File name too long", /* 63 - ENAMETOOLONG */ 119 120 /* should be rearranged */ 121 "Host is down", /* 64 - EHOSTDOWN */ 122 "No route to host", /* 65 - EHOSTUNREACH */ 123 "Directory not empty", /* 66 - ENOTEMPTY */ 124 125 /* quotas & mush */ 126 "Too many processes", /* 67 - EPROCLIM */ 127 "Too many users", /* 68 - EUSERS */ 128 "Disc quota exceeded", /* 69 - EDQUOT */ 129 130 /* Network File System */ 131 "Stale NFS file handle", /* 70 - ESTALE */ 132 "Too many levels of remote in path", /* 71 - EREMOTE */ 133 "RPC struct is bad", /* 72 - EBADRPC */ 134 "RPC version wrong", /* 73 - ERPCMISMATCH */ 135 "RPC prog. not avail", /* 74 - EPROGUNAVAIL */ 136 "Program version wrong", /* 75 - EPROGMISMATCH */ 137 "Bad procedure for program", /* 76 - EPROCUNAVAIL */ 138 139 "No locks available", /* 77 - ENOLCK */ 140 "Function not implemented", /* 78 - ENOSYS */ 141 "Inappropriate file type or format", /* 79 - EFTYPE */ 142 }; 143 int _sys_nerr = { sizeof _sys_errlist/sizeof _sys_errlist[0] }; 144