root/kern/include/kern/errmsg.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008
   3  *      The President and Fellows of Harvard College.
   4  *
   5  * Redistribution and use in source and binary forms, with or without
   6  * modification, are permitted provided that the following conditions
   7  * are met:
   8  * 1. Redistributions of source code must retain the above copyright
   9  *    notice, this list of conditions and the following disclaimer.
  10  * 2. Redistributions in binary form must reproduce the above copyright
  11  *    notice, this list of conditions and the following disclaimer in the
  12  *    documentation and/or other materials provided with the distribution.
  13  * 3. Neither the name of the University nor the names of its contributors
  14  *    may be used to endorse or promote products derived from this software
  15  *    without specific prior written permission.
  16  *
  17  * THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
  18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20  * ARE DISCLAIMED.  IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
  21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  27  * SUCH DAMAGE.
  28  */
  29 
  30 #ifndef _KERN_ERRMSG_H_
  31 #define _KERN_ERRMSG_H_
  32 
  33 /*
  34  * Error strings.
  35  * This table must agree with kern/errno.h.
  36  *
  37  * Note that since this actually defines sys_errlist and sys_nerrlist, it
  38  * should only be included in one file. For the kernel, that file is 
  39  * lib/misc.c; for userland it's lib/libc/strerror.c.
  40  */
  41 const char *const sys_errlist[] = {
  42         "Operation succeeded",        /* 0 */
  43         "No such system call",        /* ENOSYS */
  44         "Unimplemented feature",      /* EUNIMP */
  45         "Out of memory",              /* ENOMEM */
  46         "Operation would block",      /* EAGAIN (also EWOULDBLOCK) */
  47         "Interrupted system call",    /* EINTR */
  48         "Bad memory reference",       /* EFAULT */
  49         "String too long",            /* ENAMETOOLONG */
  50         "Invalid argument",           /* EINVAL */
  51         "Operation not permitted",    /* EPERM */
  52         "Permission denied",          /* EACCES */
  53         "Too many processes",         /* EMPROC (EPROCLIM in Unix) */
  54         "Too many processes in system",/* ENPROC */
  55         "File is not executable",     /* ENOEXEC */
  56         "Argument list too long",     /* E2BIG */
  57         "No such process",            /* ESRCH */
  58         "No child processes",         /* ECHILD */
  59         "Not a directory",            /* ENOTDIR */
  60         "Is a directory",             /* EISDIR */
  61         "No such file or directory",  /* ENOENT */
  62         "Too many levels of symbolic links",/* ELOOP */
  63         "Directory not empty",        /* ENOTEMPTY */
  64         "File or object exists",      /* EEXIST */
  65         "Too many hard links",        /* EMLINK */
  66         "Cross-device link",          /* EXDEV */
  67         "No such device",             /* ENODEV */
  68         "Device not available",       /* ENXIO */
  69         "Device or resource busy",    /* EBUSY */
  70         "Too many open files",        /* EMFILE */
  71         "Too many open files in system",/* ENFILE */
  72         "Bad file number",            /* EBADF */
  73         "Invalid or inappropriate ioctl",/* EIOCTL (ENOTTY in Unix) */
  74         "Input/output error",         /* EIO */
  75         "Illegal seek",               /* ESPIPE */
  76         "Broken pipe",                /* EPIPE */
  77         "Read-only file system",      /* EROFS */
  78         "No space left on device",    /* ENOSPC */
  79         "Disc quota exceeded",        /* EDQUOT */
  80         "File too large",             /* EFBIG */
  81         "Invalid file type or format",/* EFTYPE */
  82         "Argument out of range",      /* EDOM */
  83         "Result out of range",        /* ERANGE */
  84         "Invalid multibyte character sequence",/* EILSEQ */
  85         "Not a socket",               /* ENOTSOCK */
  86         "Is a socket",                /* EISSOCK (EOPNOTSUPP in Unix) */
  87         "Socket is already connected",/* EISCONN */
  88         "Socket is not connected",    /* ENOTCONN */
  89         "Socket has been shut down",  /* ESHUTDOWN */
  90         "Protocol family not supported",/* EPFNOSUPPORT */
  91         "Socket type not supported",  /* ESOCKTNOSUPPORT */
  92         "Protocol not supported",     /* EPROTONOSUPPORT */
  93         "Protocol wrong type for socket",/* EPROTOTYPE */
  94         "Address family not supported by protocol family",/* EAFNOSUPPORT */
  95         "Protocol option not available",/* ENOPROTOOPT */
  96         "Address already in use",     /* EADDRINUSE */
  97         "Cannot assign requested address",/* EADDRNOTAVAIL */
  98         "Network is down",            /* ENETDOWN */
  99         "Network is unreachable",     /* ENETUNREACH */
 100         "Host is down",               /* EHOSTDOWN */
 101         "Host is unreachable",        /* EHOSTUNREACH */
 102         "Connection refused",         /* ECONNREFUSED */
 103         "Connection timed out",       /* ETIMEDOUT */
 104         "Connection reset by peer",   /* ECONNRESET */
 105         "Message too large",          /* EMSGSIZE */
 106         "Threads operation not supported",/* ENOTSUP */
 107 };
 108 
 109 /*
 110  * Number of entries in sys_errlist.
 111  */
 112 const int sys_nerr = sizeof(sys_errlist)/sizeof(const char *);
 113 
 114 #endif /* _KERN_ERRMSG_H_ */

/* [<][>][^][v][top][bottom][index][help] */