xref: /csrg-svn/lib/libc/gen/errlst.c (revision 64889)
121340Sdist /*
261111Sbostic  * Copyright (c) 1982, 1985, 1993
361111Sbostic  *	The Regents of the University of California.  All rights reserved.
435334Sbostic  *
542623Sbostic  * %sccs.include.redist.c%
621340Sdist  */
721340Sdist 
826548Sdonn #if defined(LIBC_SCCS) && !defined(lint)
9*64889Sbostic static char sccsid[] = "@(#)errlst.c	8.2 (Berkeley) 11/16/93";
1035334Sbostic #endif /* LIBC_SCCS and not lint */
1121340Sdist 
1260019Sralph #include <stdio.h>
1353281Sbostic 
1460019Sralph const char *const sys_errlist[] = {
1539103Sbostic 	"Undefined error: 0",			/*  0 - ENOERROR */
1639103Sbostic 	"Operation not permitted",		/*  1 - EPERM */
1739103Sbostic 	"No such file or directory",		/*  2 - ENOENT */
1839103Sbostic 	"No such process",			/*  3 - ESRCH */
1939103Sbostic 	"Interrupted system call",		/*  4 - EINTR */
2039103Sbostic 	"Input/output error",			/*  5 - EIO */
2139103Sbostic 	"Device not configured",		/*  6 - ENXIO */
2239103Sbostic 	"Argument list too long",		/*  7 - E2BIG */
2339103Sbostic 	"Exec format error",			/*  8 - ENOEXEC */
2439103Sbostic 	"Bad file descriptor",			/*  9 - EBADF */
2539103Sbostic 	"No child processes",			/* 10 - ECHILD */
2639103Sbostic 	"Resource deadlock avoided",		/* 11 - EDEADLK */
2739103Sbostic 	"Cannot allocate memory",		/* 12 - ENOMEM */
285753Sroot 	"Permission denied",			/* 13 - EACCES */
295753Sroot 	"Bad address",				/* 14 - EFAULT */
305753Sroot 	"Block device required",		/* 15 - ENOTBLK */
3117460Skarels 	"Device busy",				/* 16 - EBUSY */
325753Sroot 	"File exists",				/* 17 - EEXIST */
335753Sroot 	"Cross-device link",			/* 18 - EXDEV */
3439103Sbostic 	"Operation not supported by device",	/* 19 - ENODEV */
355753Sroot 	"Not a directory",			/* 20 - ENOTDIR */
365753Sroot 	"Is a directory",			/* 21 - EISDIR */
375753Sroot 	"Invalid argument",			/* 22 - EINVAL */
3839103Sbostic 	"Too many open files in system",	/* 23 - ENFILE */
395753Sroot 	"Too many open files",			/* 24 - EMFILE */
4017460Skarels 	"Inappropriate ioctl for device",	/* 25 - ENOTTY */
415753Sroot 	"Text file busy",			/* 26 - ETXTBSY */
425753Sroot 	"File too large",			/* 27 - EFBIG */
435753Sroot 	"No space left on device",		/* 28 - ENOSPC */
445753Sroot 	"Illegal seek",				/* 29 - ESPIPE */
455753Sroot 	"Read-only file system",		/* 30 - EROFS */
465753Sroot 	"Too many links",			/* 31 - EMLINK */
475753Sroot 	"Broken pipe",				/* 32 - EPIPE */
485753Sroot 
495753Sroot /* math software */
5039103Sbostic 	"Numerical argument out of domain",	/* 33 - EDOM */
5146478Sbostic 	"Result too large",			/* 34 - ERANGE */
525753Sroot 
535753Sroot /* non-blocking and interrupt i/o */
5439103Sbostic 	"Resource temporarily unavailable",	/* 35 - EAGAIN */
5539103Sbostic 						/* 35 - EWOULDBLOCK */
565753Sroot 	"Operation now in progress",		/* 36 - EINPROGRESS */
575753Sroot 	"Operation already in progress",	/* 37 - EALREADY */
585753Sroot 
5939103Sbostic /* ipc/network software -- argument errors */
605753Sroot 	"Socket operation on non-socket",	/* 38 - ENOTSOCK */
615753Sroot 	"Destination address required",		/* 39 - EDESTADDRREQ */
625753Sroot 	"Message too long",			/* 40 - EMSGSIZE */
635753Sroot 	"Protocol wrong type for socket",	/* 41 - EPROTOTYPE */
6439103Sbostic 	"Protocol not available",		/* 42 - ENOPROTOOPT */
655753Sroot 	"Protocol not supported",		/* 43 - EPROTONOSUPPORT */
665753Sroot 	"Socket type not supported",		/* 44 - ESOCKTNOSUPPORT */
6745406Smckusick 	"Operation not supported",		/* 45 - EOPNOTSUPP */
685753Sroot 	"Protocol family not supported",	/* 46 - EPFNOSUPPORT */
6939103Sbostic 						/* 47 - EAFNOSUPPORT */
705753Sroot 	"Address family not supported by protocol family",
715753Sroot 	"Address already in use",		/* 48 - EADDRINUSE */
725753Sroot 	"Can't assign requested address",	/* 49 - EADDRNOTAVAIL */
735753Sroot 
7439103Sbostic /* ipc/network software -- operational errors */
755753Sroot 	"Network is down",			/* 50 - ENETDOWN */
765753Sroot 	"Network is unreachable",		/* 51 - ENETUNREACH */
775753Sroot 	"Network dropped connection on reset",	/* 52 - ENETRESET */
785753Sroot 	"Software caused connection abort",	/* 53 - ECONNABORTED */
795753Sroot 	"Connection reset by peer",		/* 54 - ECONNRESET */
805753Sroot 	"No buffer space available",		/* 55 - ENOBUFS */
815753Sroot 	"Socket is already connected",		/* 56 - EISCONN */
825753Sroot 	"Socket is not connected",		/* 57 - ENOTCONN */
835753Sroot 	"Can't send after socket shutdown",	/* 58 - ESHUTDOWN */
8439103Sbostic 	"Too many references: can't splice",	/* 59 - ETOOMANYREFS */
85*64889Sbostic 	"Operation timed out",			/* 60 - ETIMEDOUT */
8635334Sbostic 	"Connection refused",			/* 61 - ECONNREFUSED */
8739103Sbostic 
886420Sroot 	"Too many levels of symbolic links",	/* 62 - ELOOP */
896420Sroot 	"File name too long",			/* 63 - ENAMETOOLONG */
9039103Sbostic 
9139103Sbostic /* should be rearranged */
926606Ssam 	"Host is down",				/* 64 - EHOSTDOWN */
9339103Sbostic 	"No route to host",			/* 65 - EHOSTUNREACH */
949846Ssam 	"Directory not empty",			/* 66 - ENOTEMPTY */
9539103Sbostic 
9639103Sbostic /* quotas & mush */
979846Ssam 	"Too many processes",			/* 67 - EPROCLIM */
989846Ssam 	"Too many users",			/* 68 - EUSERS */
999846Ssam 	"Disc quota exceeded",			/* 69 - EDQUOT */
10039103Sbostic 
10139103Sbostic /* Network File System */
10239103Sbostic 	"Stale NFS file handle",		/* 70 - ESTALE */
10339103Sbostic 	"Too many levels of remote in path",	/* 71 - EREMOTE */
10439103Sbostic 	"RPC struct is bad",			/* 72 - EBADRPC */
10539103Sbostic 	"RPC version wrong",			/* 73 - ERPCMISMATCH */
10639103Sbostic 	"RPC prog. not avail",			/* 74 - EPROGUNAVAIL */
10739103Sbostic 	"Program version wrong",		/* 75 - EPROGMISMATCH */
10839103Sbostic 	"Bad procedure for program",		/* 76 - EPROCUNAVAIL */
10939103Sbostic 
11039103Sbostic 	"No locks available",			/* 77 - ENOLCK */
11139103Sbostic 	"Function not implemented",		/* 78 - ENOSYS */
11245649Sbostic 	"Inappropriate file type or format",	/* 79 - EFTYPE */
1131964Swnj };
11439103Sbostic int errno;
11553281Sbostic const int sys_nerr = sizeof(sys_errlist) / sizeof(sys_errlist[0]);
116