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