1 /*
2  * This file is subject to the terms and conditions of the GNU General Public
3  * License.  See the file "COPYING" in the main directory of this archive
4  * for more details.
5  *
6  * Copyright (C) 1995, 2001 by Ralf Baechle
7  * Copyright (C) 2001 Silicon Graphics, Inc.
8  */
9 #ifndef _ASM_ERRNO_H
10 #define _ASM_ERRNO_H
11 
12 /*
13  * These error numbers are intended to be MIPS ABI compatible
14  */
15 #define	EPERM		 1	/* Operation not permitted */
16 #define	ENOENT		 2	/* No such file or directory */
17 #define	ESRCH		 3	/* No such process */
18 #define	EINTR		 4	/* Interrupted system call */
19 #define	EIO		 5	/* I/O error */
20 #define	ENXIO		 6	/* No such device or address */
21 #define	E2BIG		 7	/* Argument list too long */
22 #define	ENOEXEC		 8	/* Exec format error */
23 #define	EBADF		 9	/* Bad file number */
24 #define	ECHILD		10	/* No child processes */
25 #define	EAGAIN		11	/* Try again */
26 #define	ENOMEM		12	/* Out of memory */
27 #define	EACCES		13	/* Permission denied */
28 #define	EFAULT		14	/* Bad address */
29 #define	ENOTBLK		15	/* Block device required */
30 #define	EBUSY		16	/* Device or resource busy */
31 #define	EEXIST		17	/* File exists */
32 #define	EXDEV		18	/* Cross-device link */
33 #define	ENODEV		19	/* No such device */
34 #define	ENOTDIR		20	/* Not a directory */
35 #define	EISDIR		21	/* Is a directory */
36 #define	EINVAL		22	/* Invalid argument */
37 #define	ENFILE		23	/* File table overflow */
38 #define	EMFILE		24	/* Too many open files */
39 #define	ENOTTY		25	/* Not a typewriter */
40 #define	ETXTBSY		26	/* Text file busy */
41 #define	EFBIG		27	/* File too large */
42 #define	ENOSPC		28	/* No space left on device */
43 #define	ESPIPE		29	/* Illegal seek */
44 #define	EROFS		30	/* Read-only file system */
45 #define	EMLINK		31	/* Too many links */
46 #define	EPIPE		32	/* Broken pipe */
47 #define	EDOM		33	/* Math argument out of domain of func */
48 #define	ERANGE		34	/* Math result not representable */
49 #define	ENOMSG		35	/* No message of desired type */
50 #define	EIDRM		36	/* Identifier removed */
51 #define	ECHRNG		37	/* Channel number out of range */
52 #define	EL2NSYNC	38	/* Level 2 not synchronized */
53 #define	EL3HLT		39	/* Level 3 halted */
54 #define	EL3RST		40	/* Level 3 reset */
55 #define	ELNRNG		41	/* Link number out of range */
56 #define	EUNATCH		42	/* Protocol driver not attached */
57 #define	ENOCSI		43	/* No CSI structure available */
58 #define	EL2HLT		44	/* Level 2 halted */
59 #define	EDEADLK		45	/* Resource deadlock would occur */
60 #define	ENOLCK		46	/* No record locks available */
61 #define	EBADE		50	/* Invalid exchange */
62 #define	EBADR		51	/* Invalid request descriptor */
63 #define	EXFULL		52	/* Exchange full */
64 #define	ENOANO		53	/* No anode */
65 #define	EBADRQC		54	/* Invalid request code */
66 #define	EBADSLT		55	/* Invalid slot */
67 #define	EDEADLOCK	56	/* File locking deadlock error */
68 #define	EBFONT		59	/* Bad font file format */
69 #define	ENOSTR		60	/* Device not a stream */
70 #define	ENODATA		61	/* No data available */
71 #define	ETIME		62	/* Timer expired */
72 #define	ENOSR		63	/* Out of streams resources */
73 #define	ENONET		64	/* Machine is not on the network */
74 #define	ENOPKG		65	/* Package not installed */
75 #define	EREMOTE		66	/* Object is remote */
76 #define	ENOLINK		67	/* Link has been severed */
77 #define	EADV		68	/* Advertise error */
78 #define	ESRMNT		69	/* Srmount error */
79 #define	ECOMM		70	/* Communication error on send */
80 #define	EPROTO		71	/* Protocol error */
81 #define	EDOTDOT		73	/* RFS specific error */
82 #define	EMULTIHOP	74	/* Multihop attempted */
83 #define	EBADMSG		77	/* Not a data message */
84 #define	ENAMETOOLONG	78	/* File name too long */
85 #define	EOVERFLOW	79	/* Value too large for defined data type */
86 #define	ENOTUNIQ	80	/* Name not unique on network */
87 #define	EBADFD		81	/* File descriptor in bad state */
88 #define	EREMCHG		82	/* Remote address changed */
89 #define	ELIBACC		83	/* Can not access a needed shared library */
90 #define	ELIBBAD		84	/* Accessing a corrupted shared library */
91 #define	ELIBSCN		85	/* .lib section in a.out corrupted */
92 #define	ELIBMAX		86	/* Attempting to link in too many shared libraries */
93 #define	ELIBEXEC	87	/* Cannot exec a shared library directly */
94 #define	EILSEQ		88	/* Illegal byte sequence */
95 #define	ENOSYS		89	/* Function not implemented */
96 #define	ELOOP		90	/* Too many symbolic links encountered */
97 #define	ERESTART	91	/* Interrupted system call should be restarted */
98 #define	ESTRPIPE	92	/* Streams pipe error */
99 #define	ENOTEMPTY	93	/* Directory not empty */
100 #define	EUSERS		94	/* Too many users */
101 #define	ENOTSOCK	95	/* Socket operation on non-socket */
102 #define	EDESTADDRREQ	96	/* Destination address required */
103 #define	EMSGSIZE	97	/* Message too long */
104 #define	EPROTOTYPE	98	/* Protocol wrong type for socket */
105 #define	ENOPROTOOPT	99	/* Protocol not available */
106 #define	EPROTONOSUPPORT	120	/* Protocol not supported */
107 #define	ESOCKTNOSUPPORT	121	/* Socket type not supported */
108 #define	EOPNOTSUPP	122	/* Operation not supported on transport endpoint */
109 #define	EPFNOSUPPORT	123	/* Protocol family not supported */
110 #define	EAFNOSUPPORT	124	/* Address family not supported by protocol */
111 #define	EADDRINUSE	125	/* Address already in use */
112 #define	EADDRNOTAVAIL	126	/* Cannot assign requested address */
113 #define	ENETDOWN	127	/* Network is down */
114 #define	ENETUNREACH	128	/* Network is unreachable */
115 #define	ENETRESET	129	/* Network dropped connection because of reset */
116 #define	ECONNABORTED	130	/* Software caused connection abort */
117 #define	ECONNRESET	131	/* Connection reset by peer */
118 #define	ENOBUFS		132	/* No buffer space available */
119 #define	EISCONN		133	/* Transport endpoint is already connected */
120 #define	ENOTCONN	134	/* Transport endpoint is not connected */
121 #define	EUCLEAN		135	/* Structure needs cleaning */
122 #define	ENOTNAM		137	/* Not a XENIX named type file */
123 #define	ENAVAIL		138	/* No XENIX semaphores available */
124 #define	EISNAM		139	/* Is a named type file */
125 #define	EREMOTEIO	140	/* Remote I/O error */
126 #define EINIT		141	/* Reserved */
127 #define EREMDEV		142	/* Error 142 */
128 #define	ESHUTDOWN	143	/* Cannot send after transport endpoint shutdown */
129 #define	ETOOMANYREFS	144	/* Too many references: cannot splice */
130 #define	ETIMEDOUT	145	/* Connection timed out */
131 #define	ECONNREFUSED	146	/* Connection refused */
132 #define	EHOSTDOWN	147	/* Host is down */
133 #define	EHOSTUNREACH	148	/* No route to host */
134 #define	EWOULDBLOCK	EAGAIN	/* Operation would block */
135 #define	EALREADY	149	/* Operation already in progress */
136 #define	EINPROGRESS	150	/* Operation now in progress */
137 #define	ESTALE		151	/* Stale NFS file handle */
138 #define ECANCELED	158	/* AIO operation canceled */
139 
140 /*
141  * These error are Linux extensions.
142  */
143 #define ENOMEDIUM	159	/* No medium found */
144 #define EMEDIUMTYPE	160	/* Wrong medium type */
145 
146 #define EDQUOT		1133	/* Quota exceeded */
147 
148 #ifdef __KERNEL__
149 
150 /* The biggest error number defined here or in <linux/errno.h>. */
151 #define EMAXERRNO	1133
152 
153 #endif /* __KERNEL__ */
154 
155 #endif /* _ASM_ERRNO_H */
156