00001 /* 00002 * Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008 00003 * The President and Fellows of Harvard College. 00004 * 00005 * Redistribution and use in source and binary forms, with or without 00006 * modification, are permitted provided that the following conditions 00007 * are met: 00008 * 1. Redistributions of source code must retain the above copyright 00009 * notice, this list of conditions and the following disclaimer. 00010 * 2. Redistributions in binary form must reproduce the above copyright 00011 * notice, this list of conditions and the following disclaimer in the 00012 * documentation and/or other materials provided with the distribution. 00013 * 3. Neither the name of the University nor the names of its contributors 00014 * may be used to endorse or promote products derived from this software 00015 * without specific prior written permission. 00016 * 00017 * THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND 00018 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00019 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00020 * ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE 00021 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00022 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00023 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00024 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00025 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00026 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00027 * SUCH DAMAGE. 00028 */ 00029 00030 #ifndef _KERN_ERRMSG_H_ 00031 #define _KERN_ERRMSG_H_ 00032 00033 /* 00034 * Error strings. 00035 * This table must agree with kern/errno.h. 00036 * 00037 * Note that since this actually defines sys_errlist and sys_nerrlist, it 00038 * should only be included in one file. For the kernel, that file is 00039 * lib/misc.c; for userland it's lib/libc/strerror.c. 00040 */ 00041 const char *const sys_errlist[] = { 00042 "Operation succeeded", /* 0 */ 00043 "No such system call", /* ENOSYS */ 00044 "Unimplemented feature", /* EUNIMP */ 00045 "Out of memory", /* ENOMEM */ 00046 "Operation would block", /* EAGAIN (also EWOULDBLOCK) */ 00047 "Interrupted system call", /* EINTR */ 00048 "Bad memory reference", /* EFAULT */ 00049 "String too long", /* ENAMETOOLONG */ 00050 "Invalid argument", /* EINVAL */ 00051 "Operation not permitted", /* EPERM */ 00052 "Permission denied", /* EACCES */ 00053 "Too many processes", /* EMPROC (EPROCLIM in Unix) */ 00054 "Too many processes in system",/* ENPROC */ 00055 "File is not executable", /* ENOEXEC */ 00056 "Argument list too long", /* E2BIG */ 00057 "No such process", /* ESRCH */ 00058 "No child processes", /* ECHILD */ 00059 "Not a directory", /* ENOTDIR */ 00060 "Is a directory", /* EISDIR */ 00061 "No such file or directory", /* ENOENT */ 00062 "Too many levels of symbolic links",/* ELOOP */ 00063 "Directory not empty", /* ENOTEMPTY */ 00064 "File or object exists", /* EEXIST */ 00065 "Too many hard links", /* EMLINK */ 00066 "Cross-device link", /* EXDEV */ 00067 "No such device", /* ENODEV */ 00068 "Device not available", /* ENXIO */ 00069 "Device or resource busy", /* EBUSY */ 00070 "Too many open files", /* EMFILE */ 00071 "Too many open files in system",/* ENFILE */ 00072 "Bad file number", /* EBADF */ 00073 "Invalid or inappropriate ioctl",/* EIOCTL (ENOTTY in Unix) */ 00074 "Input/output error", /* EIO */ 00075 "Illegal seek", /* ESPIPE */ 00076 "Broken pipe", /* EPIPE */ 00077 "Read-only file system", /* EROFS */ 00078 "No space left on device", /* ENOSPC */ 00079 "Disc quota exceeded", /* EDQUOT */ 00080 "File too large", /* EFBIG */ 00081 "Invalid file type or format",/* EFTYPE */ 00082 "Argument out of range", /* EDOM */ 00083 "Result out of range", /* ERANGE */ 00084 "Invalid multibyte character sequence",/* EILSEQ */ 00085 "Not a socket", /* ENOTSOCK */ 00086 "Is a socket", /* EISSOCK (EOPNOTSUPP in Unix) */ 00087 "Socket is already connected",/* EISCONN */ 00088 "Socket is not connected", /* ENOTCONN */ 00089 "Socket has been shut down", /* ESHUTDOWN */ 00090 "Protocol family not supported",/* EPFNOSUPPORT */ 00091 "Socket type not supported", /* ESOCKTNOSUPPORT */ 00092 "Protocol not supported", /* EPROTONOSUPPORT */ 00093 "Protocol wrong type for socket",/* EPROTOTYPE */ 00094 "Address family not supported by protocol family",/* EAFNOSUPPORT */ 00095 "Protocol option not available",/* ENOPROTOOPT */ 00096 "Address already in use", /* EADDRINUSE */ 00097 "Cannot assign requested address",/* EADDRNOTAVAIL */ 00098 "Network is down", /* ENETDOWN */ 00099 "Network is unreachable", /* ENETUNREACH */ 00100 "Host is down", /* EHOSTDOWN */ 00101 "Host is unreachable", /* EHOSTUNREACH */ 00102 "Connection refused", /* ECONNREFUSED */ 00103 "Connection timed out", /* ETIMEDOUT */ 00104 "Connection reset by peer", /* ECONNRESET */ 00105 "Message too large", /* EMSGSIZE */ 00106 "Threads operation not supported",/* ENOTSUP */ 00107 }; 00108 00109 /* 00110 * Number of entries in sys_errlist. 00111 */ 00112 const int sys_nerr = sizeof(sys_errlist)/sizeof(const char *); 00113 00114 #endif /* _KERN_ERRMSG_H_ */