11573Srgrimes/*
21573Srgrimes * Copyright (c) 1982, 1985, 1993
31573Srgrimes *	The Regents of the University of California.  All rights reserved.
41573Srgrimes *
51573Srgrimes * Redistribution and use in source and binary forms, with or without
61573Srgrimes * modification, are permitted provided that the following conditions
71573Srgrimes * are met:
81573Srgrimes * 1. Redistributions of source code must retain the above copyright
91573Srgrimes *    notice, this list of conditions and the following disclaimer.
101573Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111573Srgrimes *    notice, this list of conditions and the following disclaimer in the
121573Srgrimes *    documentation and/or other materials provided with the distribution.
131573Srgrimes * 4. Neither the name of the University nor the names of its contributors
141573Srgrimes *    may be used to endorse or promote products derived from this software
151573Srgrimes *    without specific prior written permission.
161573Srgrimes *
171573Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
181573Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
191573Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
201573Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
211573Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
221573Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
231573Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
241573Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
251573Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
261573Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
271573Srgrimes * SUCH DAMAGE.
281573Srgrimes */
291573Srgrimes
301573Srgrimes#if defined(LIBC_SCCS) && !defined(lint)
311573Srgrimesstatic char sccsid[] = "@(#)errlst.c	8.2 (Berkeley) 11/16/93";
321573Srgrimes#endif /* LIBC_SCCS and not lint */
3392986Sobrien#include <sys/cdefs.h>
3492986Sobrien__FBSDID("$FreeBSD$");
351573Srgrimes
361573Srgrimes#include <stdio.h>
371573Srgrimes
381573Srgrimesconst char *const sys_errlist[] = {
39220376Sjilles	"No error: 0",				/*  0 - ENOERROR */
401573Srgrimes	"Operation not permitted",		/*  1 - EPERM */
411573Srgrimes	"No such file or directory",		/*  2 - ENOENT */
421573Srgrimes	"No such process",			/*  3 - ESRCH */
431573Srgrimes	"Interrupted system call",		/*  4 - EINTR */
441573Srgrimes	"Input/output error",			/*  5 - EIO */
451573Srgrimes	"Device not configured",		/*  6 - ENXIO */
461573Srgrimes	"Argument list too long",		/*  7 - E2BIG */
471573Srgrimes	"Exec format error",			/*  8 - ENOEXEC */
481573Srgrimes	"Bad file descriptor",			/*  9 - EBADF */
491573Srgrimes	"No child processes",			/* 10 - ECHILD */
501573Srgrimes	"Resource deadlock avoided",		/* 11 - EDEADLK */
511573Srgrimes	"Cannot allocate memory",		/* 12 - ENOMEM */
521573Srgrimes	"Permission denied",			/* 13 - EACCES */
531573Srgrimes	"Bad address",				/* 14 - EFAULT */
541573Srgrimes	"Block device required",		/* 15 - ENOTBLK */
551573Srgrimes	"Device busy",				/* 16 - EBUSY */
561573Srgrimes	"File exists",				/* 17 - EEXIST */
571573Srgrimes	"Cross-device link",			/* 18 - EXDEV */
581573Srgrimes	"Operation not supported by device",	/* 19 - ENODEV */
591573Srgrimes	"Not a directory",			/* 20 - ENOTDIR */
601573Srgrimes	"Is a directory",			/* 21 - EISDIR */
611573Srgrimes	"Invalid argument",			/* 22 - EINVAL */
621573Srgrimes	"Too many open files in system",	/* 23 - ENFILE */
631573Srgrimes	"Too many open files",			/* 24 - EMFILE */
641573Srgrimes	"Inappropriate ioctl for device",	/* 25 - ENOTTY */
651573Srgrimes	"Text file busy",			/* 26 - ETXTBSY */
661573Srgrimes	"File too large",			/* 27 - EFBIG */
671573Srgrimes	"No space left on device",		/* 28 - ENOSPC */
681573Srgrimes	"Illegal seek",				/* 29 - ESPIPE */
691573Srgrimes	"Read-only file system",		/* 30 - EROFS */
701573Srgrimes	"Too many links",			/* 31 - EMLINK */
711573Srgrimes	"Broken pipe",				/* 32 - EPIPE */
721573Srgrimes
731573Srgrimes/* math software */
741573Srgrimes	"Numerical argument out of domain",	/* 33 - EDOM */
751573Srgrimes	"Result too large",			/* 34 - ERANGE */
761573Srgrimes
771573Srgrimes/* non-blocking and interrupt i/o */
781573Srgrimes	"Resource temporarily unavailable",	/* 35 - EAGAIN */
791573Srgrimes						/* 35 - EWOULDBLOCK */
801573Srgrimes	"Operation now in progress",		/* 36 - EINPROGRESS */
811573Srgrimes	"Operation already in progress",	/* 37 - EALREADY */
821573Srgrimes
831573Srgrimes/* ipc/network software -- argument errors */
841573Srgrimes	"Socket operation on non-socket",	/* 38 - ENOTSOCK */
851573Srgrimes	"Destination address required",		/* 39 - EDESTADDRREQ */
861573Srgrimes	"Message too long",			/* 40 - EMSGSIZE */
871573Srgrimes	"Protocol wrong type for socket",	/* 41 - EPROTOTYPE */
881573Srgrimes	"Protocol not available",		/* 42 - ENOPROTOOPT */
891573Srgrimes	"Protocol not supported",		/* 43 - EPROTONOSUPPORT */
901573Srgrimes	"Socket type not supported",		/* 44 - ESOCKTNOSUPPORT */
911573Srgrimes	"Operation not supported",		/* 45 - EOPNOTSUPP */
921573Srgrimes	"Protocol family not supported",	/* 46 - EPFNOSUPPORT */
931573Srgrimes						/* 47 - EAFNOSUPPORT */
941573Srgrimes	"Address family not supported by protocol family",
951573Srgrimes	"Address already in use",		/* 48 - EADDRINUSE */
961573Srgrimes	"Can't assign requested address",	/* 49 - EADDRNOTAVAIL */
971573Srgrimes
981573Srgrimes/* ipc/network software -- operational errors */
991573Srgrimes	"Network is down",			/* 50 - ENETDOWN */
1001573Srgrimes	"Network is unreachable",		/* 51 - ENETUNREACH */
1011573Srgrimes	"Network dropped connection on reset",	/* 52 - ENETRESET */
1021573Srgrimes	"Software caused connection abort",	/* 53 - ECONNABORTED */
1031573Srgrimes	"Connection reset by peer",		/* 54 - ECONNRESET */
1041573Srgrimes	"No buffer space available",		/* 55 - ENOBUFS */
1051573Srgrimes	"Socket is already connected",		/* 56 - EISCONN */
1061573Srgrimes	"Socket is not connected",		/* 57 - ENOTCONN */
1071573Srgrimes	"Can't send after socket shutdown",	/* 58 - ESHUTDOWN */
1081573Srgrimes	"Too many references: can't splice",	/* 59 - ETOOMANYREFS */
1091573Srgrimes	"Operation timed out",			/* 60 - ETIMEDOUT */
1101573Srgrimes	"Connection refused",			/* 61 - ECONNREFUSED */
1111573Srgrimes
1121573Srgrimes	"Too many levels of symbolic links",	/* 62 - ELOOP */
1131573Srgrimes	"File name too long",			/* 63 - ENAMETOOLONG */
1141573Srgrimes
1151573Srgrimes/* should be rearranged */
1161573Srgrimes	"Host is down",				/* 64 - EHOSTDOWN */
1171573Srgrimes	"No route to host",			/* 65 - EHOSTUNREACH */
1181573Srgrimes	"Directory not empty",			/* 66 - ENOTEMPTY */
1191573Srgrimes
1201573Srgrimes/* quotas & mush */
1211573Srgrimes	"Too many processes",			/* 67 - EPROCLIM */
1221573Srgrimes	"Too many users",			/* 68 - EUSERS */
1231573Srgrimes	"Disc quota exceeded",			/* 69 - EDQUOT */
1241573Srgrimes
1251573Srgrimes/* Network File System */
1261573Srgrimes	"Stale NFS file handle",		/* 70 - ESTALE */
1271573Srgrimes	"Too many levels of remote in path",	/* 71 - EREMOTE */
1281573Srgrimes	"RPC struct is bad",			/* 72 - EBADRPC */
1291573Srgrimes	"RPC version wrong",			/* 73 - ERPCMISMATCH */
1301573Srgrimes	"RPC prog. not avail",			/* 74 - EPROGUNAVAIL */
1311573Srgrimes	"Program version wrong",		/* 75 - EPROGMISMATCH */
1321573Srgrimes	"Bad procedure for program",		/* 76 - EPROCUNAVAIL */
1331573Srgrimes
1341573Srgrimes	"No locks available",			/* 77 - ENOLCK */
1351573Srgrimes	"Function not implemented",		/* 78 - ENOSYS */
1361573Srgrimes	"Inappropriate file type or format",	/* 79 - EFTYPE */
13746018Sphk	"Authentication error",			/* 80 - EAUTH */
13846018Sphk	"Need authenticator",			/* 81 - ENEEDAUTH */
13946018Sphk	"Identifier removed",			/* 82 - EIDRM */
14046018Sphk	"No message of desired type",		/* 83 - ENOMSG */
14146018Sphk	"Value too large to be stored in data type", /* 84 - EOVERFLOW */
14246018Sphk	"Operation canceled",			/* 85 - ECANCELED */
14346018Sphk	"Illegal byte sequence",		/* 86 - EILSEQ */
14491814Sgreen	"Attribute not found",			/* 87 - ENOATTR */
145101567Sphk
146101567Sphk/* General */
147102229Sphk	"Programming error",			/* 88 - EDOOFUS */
148144530Sdas
149144530Sdas	"Bad message",				/* 89 - EBADMSG */
150144530Sdas	"Multihop attempted",			/* 90 - EMULTIHOP */
151144530Sdas	"Link has been severed",		/* 91 - ENOLINK */
152144530Sdas	"Protocol error",			/* 92 - EPROTO */
153197841Srwatson	"Capabilities insufficient",		/* 93 - ENOTCAPABLE */
154219222Srwatson	"Not permitted in capability mode",	/* 94 - ECAPMODE */
1551573Srgrimes};
1561573Srgrimesconst int sys_nerr = sizeof(sys_errlist) / sizeof(sys_errlist[0]);
157