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.12 (Berkeley) 05/15/93"; 10 #endif /* LIBC_SCCS and not lint */ 11 12 #include <stdio.h> 13 14 const char *const sys_errlist[] = { 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 */ 28 "Permission denied", /* 13 - EACCES */ 29 "Bad address", /* 14 - EFAULT */ 30 "Block device required", /* 15 - ENOTBLK */ 31 "Device busy", /* 16 - EBUSY */ 32 "File exists", /* 17 - EEXIST */ 33 "Cross-device link", /* 18 - EXDEV */ 34 "Operation not supported by device", /* 19 - ENODEV */ 35 "Not a directory", /* 20 - ENOTDIR */ 36 "Is a directory", /* 21 - EISDIR */ 37 "Invalid argument", /* 22 - EINVAL */ 38 "Too many open files in system", /* 23 - ENFILE */ 39 "Too many open files", /* 24 - EMFILE */ 40 "Inappropriate ioctl for device", /* 25 - ENOTTY */ 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 */ 50 "Numerical argument out of domain", /* 33 - EDOM */ 51 "Result too large", /* 34 - ERANGE */ 52 53 /* non-blocking and interrupt i/o */ 54 "Resource temporarily unavailable", /* 35 - EAGAIN */ 55 /* 35 - EWOULDBLOCK */ 56 "Operation now in progress", /* 36 - EINPROGRESS */ 57 "Operation already in progress", /* 37 - EALREADY */ 58 59 /* ipc/network software -- argument errors */ 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 */ 64 "Protocol not available", /* 42 - ENOPROTOOPT */ 65 "Protocol not supported", /* 43 - EPROTONOSUPPORT */ 66 "Socket type not supported", /* 44 - ESOCKTNOSUPPORT */ 67 "Operation not supported", /* 45 - EOPNOTSUPP */ 68 "Protocol family not supported", /* 46 - EPFNOSUPPORT */ 69 /* 47 - EAFNOSUPPORT */ 70 "Address family not supported by protocol family", 71 "Address already in use", /* 48 - EADDRINUSE */ 72 "Can't assign requested address", /* 49 - EADDRNOTAVAIL */ 73 74 /* ipc/network software -- operational errors */ 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 */ 84 "Too many references: can't splice", /* 59 - ETOOMANYREFS */ 85 "Connection timed out", /* 60 - ETIMEDOUT */ 86 "Connection refused", /* 61 - ECONNREFUSED */ 87 88 "Too many levels of symbolic links", /* 62 - ELOOP */ 89 "File name too long", /* 63 - ENAMETOOLONG */ 90 91 /* should be rearranged */ 92 "Host is down", /* 64 - EHOSTDOWN */ 93 "No route to host", /* 65 - EHOSTUNREACH */ 94 "Directory not empty", /* 66 - ENOTEMPTY */ 95 96 /* quotas & mush */ 97 "Too many processes", /* 67 - EPROCLIM */ 98 "Too many users", /* 68 - EUSERS */ 99 "Disc quota exceeded", /* 69 - EDQUOT */ 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 */ 112 "Inappropriate file type or format", /* 79 - EFTYPE */ 113 }; 114 int errno; 115 const int sys_nerr = sizeof(sys_errlist) / sizeof(sys_errlist[0]); 116