xref: /original-bsd/lib/libc/gen/errlst.c (revision 3588a932)
1 /*
2  * Copyright (c) 1982, 1985 Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #if defined(LIBC_SCCS) && !defined(lint)
9 static char sccsid[] = "@(#)errlst.c	5.10 (Berkeley) 02/19/91";
10 #endif /* LIBC_SCCS and not lint */
11 
12 char *sys_errlist[] = {
13 	"Undefined error: 0",			/*  0 - ENOERROR */
14 	"Operation not permitted",		/*  1 - EPERM */
15 	"No such file or directory",		/*  2 - ENOENT */
16 	"No such process",			/*  3 - ESRCH */
17 	"Interrupted system call",		/*  4 - EINTR */
18 	"Input/output error",			/*  5 - EIO */
19 	"Device not configured",		/*  6 - ENXIO */
20 	"Argument list too long",		/*  7 - E2BIG */
21 	"Exec format error",			/*  8 - ENOEXEC */
22 	"Bad file descriptor",			/*  9 - EBADF */
23 	"No child processes",			/* 10 - ECHILD */
24 	"Resource deadlock avoided",		/* 11 - EDEADLK */
25 	"Cannot allocate memory",		/* 12 - ENOMEM */
26 	"Permission denied",			/* 13 - EACCES */
27 	"Bad address",				/* 14 - EFAULT */
28 	"Block device required",		/* 15 - ENOTBLK */
29 	"Device busy",				/* 16 - EBUSY */
30 	"File exists",				/* 17 - EEXIST */
31 	"Cross-device link",			/* 18 - EXDEV */
32 	"Operation not supported by device",	/* 19 - ENODEV */
33 	"Not a directory",			/* 20 - ENOTDIR */
34 	"Is a directory",			/* 21 - EISDIR */
35 	"Invalid argument",			/* 22 - EINVAL */
36 	"Too many open files in system",	/* 23 - ENFILE */
37 	"Too many open files",			/* 24 - EMFILE */
38 	"Inappropriate ioctl for device",	/* 25 - ENOTTY */
39 	"Text file busy",			/* 26 - ETXTBSY */
40 	"File too large",			/* 27 - EFBIG */
41 	"No space left on device",		/* 28 - ENOSPC */
42 	"Illegal seek",				/* 29 - ESPIPE */
43 	"Read-only file system",		/* 30 - EROFS */
44 	"Too many links",			/* 31 - EMLINK */
45 	"Broken pipe",				/* 32 - EPIPE */
46 
47 /* math software */
48 	"Numerical argument out of domain",	/* 33 - EDOM */
49 	"Result too large",			/* 34 - ERANGE */
50 
51 /* non-blocking and interrupt i/o */
52 	"Resource temporarily unavailable",	/* 35 - EAGAIN */
53 						/* 35 - EWOULDBLOCK */
54 	"Operation now in progress",		/* 36 - EINPROGRESS */
55 	"Operation already in progress",	/* 37 - EALREADY */
56 
57 /* ipc/network software -- argument errors */
58 	"Socket operation on non-socket",	/* 38 - ENOTSOCK */
59 	"Destination address required",		/* 39 - EDESTADDRREQ */
60 	"Message too long",			/* 40 - EMSGSIZE */
61 	"Protocol wrong type for socket",	/* 41 - EPROTOTYPE */
62 	"Protocol not available",		/* 42 - ENOPROTOOPT */
63 	"Protocol not supported",		/* 43 - EPROTONOSUPPORT */
64 	"Socket type not supported",		/* 44 - ESOCKTNOSUPPORT */
65 	"Operation not supported",		/* 45 - EOPNOTSUPP */
66 	"Protocol family not supported",	/* 46 - EPFNOSUPPORT */
67 						/* 47 - EAFNOSUPPORT */
68 	"Address family not supported by protocol family",
69 	"Address already in use",		/* 48 - EADDRINUSE */
70 	"Can't assign requested address",	/* 49 - EADDRNOTAVAIL */
71 
72 /* ipc/network software -- operational errors */
73 	"Network is down",			/* 50 - ENETDOWN */
74 	"Network is unreachable",		/* 51 - ENETUNREACH */
75 	"Network dropped connection on reset",	/* 52 - ENETRESET */
76 	"Software caused connection abort",	/* 53 - ECONNABORTED */
77 	"Connection reset by peer",		/* 54 - ECONNRESET */
78 	"No buffer space available",		/* 55 - ENOBUFS */
79 	"Socket is already connected",		/* 56 - EISCONN */
80 	"Socket is not connected",		/* 57 - ENOTCONN */
81 	"Can't send after socket shutdown",	/* 58 - ESHUTDOWN */
82 	"Too many references: can't splice",	/* 59 - ETOOMANYREFS */
83 	"Connection timed out",			/* 60 - ETIMEDOUT */
84 	"Connection refused",			/* 61 - ECONNREFUSED */
85 
86 	"Too many levels of symbolic links",	/* 62 - ELOOP */
87 	"File name too long",			/* 63 - ENAMETOOLONG */
88 
89 /* should be rearranged */
90 	"Host is down",				/* 64 - EHOSTDOWN */
91 	"No route to host",			/* 65 - EHOSTUNREACH */
92 	"Directory not empty",			/* 66 - ENOTEMPTY */
93 
94 /* quotas & mush */
95 	"Too many processes",			/* 67 - EPROCLIM */
96 	"Too many users",			/* 68 - EUSERS */
97 	"Disc quota exceeded",			/* 69 - EDQUOT */
98 
99 /* Network File System */
100 	"Stale NFS file handle",		/* 70 - ESTALE */
101 	"Too many levels of remote in path",	/* 71 - EREMOTE */
102 	"RPC struct is bad",			/* 72 - EBADRPC */
103 	"RPC version wrong",			/* 73 - ERPCMISMATCH */
104 	"RPC prog. not avail",			/* 74 - EPROGUNAVAIL */
105 	"Program version wrong",		/* 75 - EPROGMISMATCH */
106 	"Bad procedure for program",		/* 76 - EPROCUNAVAIL */
107 
108 	"No locks available",			/* 77 - ENOLCK */
109 	"Function not implemented",		/* 78 - ENOSYS */
110 	"Inappropriate file type or format",	/* 79 - EFTYPE */
111 };
112 int errno;
113 int sys_nerr = { sizeof sys_errlist/sizeof sys_errlist[0] };
114