xref: /csrg-svn/lib/libc/gen/errlst.c (revision 35334)
121340Sdist /*
2*35334Sbostic  * Copyright (c) 1982, 1985 Regents of the University of California.
3*35334Sbostic  * All rights reserved.
4*35334Sbostic  *
5*35334Sbostic  * Redistribution and use in source and binary forms are permitted
6*35334Sbostic  * provided that the above copyright notice and this paragraph are
7*35334Sbostic  * duplicated in all such forms and that any documentation,
8*35334Sbostic  * advertising materials, and other materials related to such
9*35334Sbostic  * distribution and use acknowledge that the software was developed
10*35334Sbostic  * by the University of California, Berkeley.  The name of the
11*35334Sbostic  * University may not be used to endorse or promote products derived
12*35334Sbostic  * from this software without specific prior written permission.
13*35334Sbostic  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14*35334Sbostic  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15*35334Sbostic  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1621340Sdist  */
1721340Sdist 
1826548Sdonn #if defined(LIBC_SCCS) && !defined(lint)
19*35334Sbostic static char sccsid[] = "@(#)errlst.c	5.3 (Berkeley) 08/05/88";
20*35334Sbostic #endif /* LIBC_SCCS and not lint */
2121340Sdist 
221964Swnj char	*sys_errlist[] = {
231964Swnj 	"Error 0",
245753Sroot 	"Not owner",				/* 1 - EPERM */
255753Sroot 	"No such file or directory",		/* 2 - ENOENT */
265753Sroot 	"No such process",			/* 3 - ESRCH */
275753Sroot 	"Interrupted system call",		/* 4 - EINTR */
285753Sroot 	"I/O error",				/* 5 - EIO */
295753Sroot 	"No such device or address",		/* 6 - ENXIO */
305753Sroot 	"Arg list too long",			/* 7 - E2BIG */
315753Sroot 	"Exec format error",			/* 8 - ENOEXEC */
325753Sroot 	"Bad file number",			/* 9 - EBADF */
335753Sroot 	"No children",				/* 10 - ECHILD */
345753Sroot 	"No more processes",			/* 11 - EAGAIN */
3517460Skarels 	"Not enough memory",			/* 12 - ENOMEM */
365753Sroot 	"Permission denied",			/* 13 - EACCES */
375753Sroot 	"Bad address",				/* 14 - EFAULT */
385753Sroot 	"Block device required",		/* 15 - ENOTBLK */
3917460Skarels 	"Device busy",				/* 16 - EBUSY */
405753Sroot 	"File exists",				/* 17 - EEXIST */
415753Sroot 	"Cross-device link",			/* 18 - EXDEV */
425753Sroot 	"No such device",			/* 19 - ENODEV */
435753Sroot 	"Not a directory",			/* 20 - ENOTDIR */
445753Sroot 	"Is a directory",			/* 21 - EISDIR */
455753Sroot 	"Invalid argument",			/* 22 - EINVAL */
465753Sroot 	"File table overflow",			/* 23 - ENFILE */
475753Sroot 	"Too many open files",			/* 24 - EMFILE */
4817460Skarels 	"Inappropriate ioctl for device",	/* 25 - ENOTTY */
495753Sroot 	"Text file busy",			/* 26 - ETXTBSY */
505753Sroot 	"File too large",			/* 27 - EFBIG */
515753Sroot 	"No space left on device",		/* 28 - ENOSPC */
525753Sroot 	"Illegal seek",				/* 29 - ESPIPE */
535753Sroot 	"Read-only file system",		/* 30 - EROFS */
545753Sroot 	"Too many links",			/* 31 - EMLINK */
555753Sroot 	"Broken pipe",				/* 32 - EPIPE */
565753Sroot 
575753Sroot /* math software */
585753Sroot 	"Argument too large",			/* 33 - EDOM */
595753Sroot 	"Result too large",			/* 34 - ERANGE */
605753Sroot 
615753Sroot /* non-blocking and interrupt i/o */
625753Sroot 	"Operation would block",		/* 35 - EWOULDBLOCK */
635753Sroot 	"Operation now in progress",		/* 36 - EINPROGRESS */
645753Sroot 	"Operation already in progress",	/* 37 - EALREADY */
655753Sroot 
665753Sroot /* ipc/network software */
675753Sroot 
685753Sroot 	/* argument errors */
695753Sroot 	"Socket operation on non-socket",	/* 38 - ENOTSOCK */
705753Sroot 	"Destination address required",		/* 39 - EDESTADDRREQ */
715753Sroot 	"Message too long",			/* 40 - EMSGSIZE */
725753Sroot 	"Protocol wrong type for socket",	/* 41 - EPROTOTYPE */
7317460Skarels 	"Option not supported by protocol",	/* 42 - ENOPROTOOPT */
745753Sroot 	"Protocol not supported",		/* 43 - EPROTONOSUPPORT */
755753Sroot 	"Socket type not supported",		/* 44 - ESOCKTNOSUPPORT */
765753Sroot 	"Operation not supported on socket",	/* 45 - EOPNOTSUPP */
775753Sroot 	"Protocol family not supported",	/* 46 - EPFNOSUPPORT */
785753Sroot 	"Address family not supported by protocol family",
795753Sroot 						/* 47 - EAFNOSUPPORT */
805753Sroot 	"Address already in use",		/* 48 - EADDRINUSE */
815753Sroot 	"Can't assign requested address",	/* 49 - EADDRNOTAVAIL */
825753Sroot 
835753Sroot 	/* operational errors */
845753Sroot 	"Network is down",			/* 50 - ENETDOWN */
855753Sroot 	"Network is unreachable",		/* 51 - ENETUNREACH */
865753Sroot 	"Network dropped connection on reset",	/* 52 - ENETRESET */
875753Sroot 	"Software caused connection abort",	/* 53 - ECONNABORTED */
885753Sroot 	"Connection reset by peer",		/* 54 - ECONNRESET */
895753Sroot 	"No buffer space available",		/* 55 - ENOBUFS */
905753Sroot 	"Socket is already connected",		/* 56 - EISCONN */
915753Sroot 	"Socket is not connected",		/* 57 - ENOTCONN */
925753Sroot 	"Can't send after socket shutdown",	/* 58 - ESHUTDOWN */
93*35334Sbostic 	"Error 59",				/* 59 - unused */
945753Sroot 	"Connection timed out",			/* 60 - ETIMEDOUT */
95*35334Sbostic 	"Connection refused",			/* 61 - ECONNREFUSED */
966420Sroot 	"Too many levels of symbolic links",	/* 62 - ELOOP */
976420Sroot 	"File name too long",			/* 63 - ENAMETOOLONG */
986606Ssam 	"Host is down",				/* 64 - EHOSTDOWN */
996606Ssam 	"Host is unreachable",			/* 65 - EHOSTUNREACH */
1009846Ssam 	"Directory not empty",			/* 66 - ENOTEMPTY */
1019846Ssam 	"Too many processes",			/* 67 - EPROCLIM */
1029846Ssam 	"Too many users",			/* 68 - EUSERS */
1039846Ssam 	"Disc quota exceeded",			/* 69 - EDQUOT */
1041964Swnj };
1051964Swnj int	sys_nerr = { sizeof sys_errlist/sizeof sys_errlist[0] };
106