xref: /original-bsd/lib/libc/gen/errlst.c (revision 2301fdfb)
1 /*
2  * Copyright (c) 1982, 1985 Regents of the University of California.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms are permitted
6  * provided that the above copyright notice and this paragraph are
7  * duplicated in all such forms and that any documentation,
8  * advertising materials, and other materials related to such
9  * distribution and use acknowledge that the software was developed
10  * by the University of California, Berkeley.  The name of the
11  * University may not be used to endorse or promote products derived
12  * from this software without specific prior written permission.
13  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16  */
17 
18 #if defined(LIBC_SCCS) && !defined(lint)
19 static char sccsid[] = "@(#)errlst.c	5.3 (Berkeley) 08/05/88";
20 #endif /* LIBC_SCCS and not lint */
21 
22 char	*sys_errlist[] = {
23 	"Error 0",
24 	"Not owner",				/* 1 - EPERM */
25 	"No such file or directory",		/* 2 - ENOENT */
26 	"No such process",			/* 3 - ESRCH */
27 	"Interrupted system call",		/* 4 - EINTR */
28 	"I/O error",				/* 5 - EIO */
29 	"No such device or address",		/* 6 - ENXIO */
30 	"Arg list too long",			/* 7 - E2BIG */
31 	"Exec format error",			/* 8 - ENOEXEC */
32 	"Bad file number",			/* 9 - EBADF */
33 	"No children",				/* 10 - ECHILD */
34 	"No more processes",			/* 11 - EAGAIN */
35 	"Not enough memory",			/* 12 - ENOMEM */
36 	"Permission denied",			/* 13 - EACCES */
37 	"Bad address",				/* 14 - EFAULT */
38 	"Block device required",		/* 15 - ENOTBLK */
39 	"Device busy",				/* 16 - EBUSY */
40 	"File exists",				/* 17 - EEXIST */
41 	"Cross-device link",			/* 18 - EXDEV */
42 	"No such device",			/* 19 - ENODEV */
43 	"Not a directory",			/* 20 - ENOTDIR */
44 	"Is a directory",			/* 21 - EISDIR */
45 	"Invalid argument",			/* 22 - EINVAL */
46 	"File table overflow",			/* 23 - ENFILE */
47 	"Too many open files",			/* 24 - EMFILE */
48 	"Inappropriate ioctl for device",	/* 25 - ENOTTY */
49 	"Text file busy",			/* 26 - ETXTBSY */
50 	"File too large",			/* 27 - EFBIG */
51 	"No space left on device",		/* 28 - ENOSPC */
52 	"Illegal seek",				/* 29 - ESPIPE */
53 	"Read-only file system",		/* 30 - EROFS */
54 	"Too many links",			/* 31 - EMLINK */
55 	"Broken pipe",				/* 32 - EPIPE */
56 
57 /* math software */
58 	"Argument too large",			/* 33 - EDOM */
59 	"Result too large",			/* 34 - ERANGE */
60 
61 /* non-blocking and interrupt i/o */
62 	"Operation would block",		/* 35 - EWOULDBLOCK */
63 	"Operation now in progress",		/* 36 - EINPROGRESS */
64 	"Operation already in progress",	/* 37 - EALREADY */
65 
66 /* ipc/network software */
67 
68 	/* argument errors */
69 	"Socket operation on non-socket",	/* 38 - ENOTSOCK */
70 	"Destination address required",		/* 39 - EDESTADDRREQ */
71 	"Message too long",			/* 40 - EMSGSIZE */
72 	"Protocol wrong type for socket",	/* 41 - EPROTOTYPE */
73 	"Option not supported by protocol",	/* 42 - ENOPROTOOPT */
74 	"Protocol not supported",		/* 43 - EPROTONOSUPPORT */
75 	"Socket type not supported",		/* 44 - ESOCKTNOSUPPORT */
76 	"Operation not supported on socket",	/* 45 - EOPNOTSUPP */
77 	"Protocol family not supported",	/* 46 - EPFNOSUPPORT */
78 	"Address family not supported by protocol family",
79 						/* 47 - EAFNOSUPPORT */
80 	"Address already in use",		/* 48 - EADDRINUSE */
81 	"Can't assign requested address",	/* 49 - EADDRNOTAVAIL */
82 
83 	/* operational errors */
84 	"Network is down",			/* 50 - ENETDOWN */
85 	"Network is unreachable",		/* 51 - ENETUNREACH */
86 	"Network dropped connection on reset",	/* 52 - ENETRESET */
87 	"Software caused connection abort",	/* 53 - ECONNABORTED */
88 	"Connection reset by peer",		/* 54 - ECONNRESET */
89 	"No buffer space available",		/* 55 - ENOBUFS */
90 	"Socket is already connected",		/* 56 - EISCONN */
91 	"Socket is not connected",		/* 57 - ENOTCONN */
92 	"Can't send after socket shutdown",	/* 58 - ESHUTDOWN */
93 	"Error 59",				/* 59 - unused */
94 	"Connection timed out",			/* 60 - ETIMEDOUT */
95 	"Connection refused",			/* 61 - ECONNREFUSED */
96 	"Too many levels of symbolic links",	/* 62 - ELOOP */
97 	"File name too long",			/* 63 - ENAMETOOLONG */
98 	"Host is down",				/* 64 - EHOSTDOWN */
99 	"Host is unreachable",			/* 65 - EHOSTUNREACH */
100 	"Directory not empty",			/* 66 - ENOTEMPTY */
101 	"Too many processes",			/* 67 - EPROCLIM */
102 	"Too many users",			/* 68 - EUSERS */
103 	"Disc quota exceeded",			/* 69 - EDQUOT */
104 };
105 int	sys_nerr = { sizeof sys_errlist/sizeof sys_errlist[0] };
106