/* [<][>][^][v][top][bottom][index][help] */
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_ERRNO_H_
31 #define _KERN_ERRNO_H_
32
33 /*
34 * If you change this, be sure to make appropriate corresponding changes
35 * to kern/errmsg.h as well. You might also want to change the man page
36 * for errno to document the new error.
37 *
38 * This has been changed relative to OS/161 1.x to make the grouping
39 * more logical.
40 *
41 * Also note that this file has to work from assembler, so it should
42 * contain only symbolic constants.
43 */
44
45 #define ENOSYS 1 /* No such system call */
46 #define EUNIMP 2 /* Unimplemented feature */
47 #define ENOMEM 3 /* Out of memory */
48 #define EAGAIN 4 /* Operation would block */
49 #define EINTR 5 /* Interrupted system call */
50 #define EFAULT 6 /* Bad memory reference */
51 #define ENAMETOOLONG 7 /* String too long */
52 #define EINVAL 8 /* Invalid argument */
53 #define EPERM 9 /* Operation not permitted */
54 #define EACCES 10 /* Permission denied */
55 #define EMPROC 11 /* Too many processes */
56 #define ENPROC 12 /* Too many processes in system */
57 #define ENOEXEC 13 /* File is not executable */
58 #define E2BIG 14 /* Argument list too long */
59 #define ESRCH 15 /* No such process */
60 #define ECHILD 16 /* No child processes */
61 #define ENOTDIR 17 /* Not a directory */
62 #define EISDIR 18 /* Is a directory */
63 #define ENOENT 19 /* No such file or directory */
64 #define ELOOP 20 /* Too many levels of symbolic links */
65 #define ENOTEMPTY 21 /* Directory not empty */
66 #define EEXIST 22 /* File or object exists */
67 #define EMLINK 23 /* Too many hard links */
68 #define EXDEV 24 /* Cross-device link */
69 #define ENODEV 25 /* No such device */
70 #define ENXIO 26 /* Device not available */
71 #define EBUSY 27 /* Device or resource busy */
72 #define EMFILE 28 /* Too many open files */
73 #define ENFILE 29 /* Too many open files in system */
74 #define EBADF 30 /* Bad file number */
75 #define EIOCTL 31 /* Invalid or inappropriate ioctl */
76 #define EIO 32 /* Input/output error */
77 #define ESPIPE 33 /* Illegal seek */
78 #define EPIPE 34 /* Broken pipe */
79 #define EROFS 35 /* Read-only file system */
80 #define ENOSPC 36 /* No space left on device */
81 #define EDQUOT 37 /* Disc quota exceeded */
82 #define EFBIG 38 /* File too large */
83 #define EFTYPE 39 /* Invalid file type or format */
84 #define EDOM 40 /* Argument out of range */
85 #define ERANGE 41 /* Result out of range */
86 #define EILSEQ 42 /* Invalid multibyte character sequence */
87 #define ENOTSOCK 43 /* Not a socket */
88 #define EISSOCK 44 /* Is a socket */
89 #define EISCONN 45 /* Socket is already connected */
90 #define ENOTCONN 46 /* Socket is not connected */
91 #define ESHUTDOWN 47 /* Socket has been shut down */
92 #define EPFNOSUPPORT 48 /* Protocol family not supported */
93 #define ESOCKTNOSUPPORT 49 /* Socket type not supported */
94 #define EPROTONOSUPPORT 50 /* Protocol not supported */
95 #define EPROTOTYPE 51 /* Protocol wrong type for socket */
96 #define EAFNOSUPPORT 52 /* Address family not supported by protocol family */
97 #define ENOPROTOOPT 53 /* Protocol option not available */
98 #define EADDRINUSE 54 /* Address already in use */
99 #define EADDRNOTAVAIL 55 /* Cannot assign requested address */
100 #define ENETDOWN 56 /* Network is down */
101 #define ENETUNREACH 57 /* Network is unreachable */
102 #define EHOSTDOWN 58 /* Host is down */
103 #define EHOSTUNREACH 59 /* Host is unreachable */
104 #define ECONNREFUSED 60 /* Connection refused */
105 #define ETIMEDOUT 61 /* Connection timed out */
106 #define ECONNRESET 62 /* Connection reset by peer */
107 #define EMSGSIZE 63 /* Message too large */
108 #define ENOTSUP 64 /* Threads operation not supported */
109
110
111 #endif /* _KERN_ERRNO_H_ */