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