xref: /titanic_51/usr/src/uts/common/sys/errno.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate  */
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
28*7c478bd9Sstevel@tonic-gate /*	  All Rights Reserved  	*/
29*7c478bd9Sstevel@tonic-gate 
30*7c478bd9Sstevel@tonic-gate /*
31*7c478bd9Sstevel@tonic-gate  * University Copyright- Copyright (c) 1982, 1986, 1988
32*7c478bd9Sstevel@tonic-gate  * The Regents of the University of California
33*7c478bd9Sstevel@tonic-gate  * All Rights Reserved
34*7c478bd9Sstevel@tonic-gate  *
35*7c478bd9Sstevel@tonic-gate  * University Acknowledgment- Portions of this document are derived from
36*7c478bd9Sstevel@tonic-gate  * software developed by the University of California, Berkeley, and its
37*7c478bd9Sstevel@tonic-gate  * contributors.
38*7c478bd9Sstevel@tonic-gate  */
39*7c478bd9Sstevel@tonic-gate 
40*7c478bd9Sstevel@tonic-gate #ifndef _SYS_ERRNO_H
41*7c478bd9Sstevel@tonic-gate #define	_SYS_ERRNO_H
42*7c478bd9Sstevel@tonic-gate 
43*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
44*7c478bd9Sstevel@tonic-gate 
45*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
46*7c478bd9Sstevel@tonic-gate extern "C" {
47*7c478bd9Sstevel@tonic-gate #endif
48*7c478bd9Sstevel@tonic-gate 
49*7c478bd9Sstevel@tonic-gate /*
50*7c478bd9Sstevel@tonic-gate  * Error codes
51*7c478bd9Sstevel@tonic-gate  */
52*7c478bd9Sstevel@tonic-gate 
53*7c478bd9Sstevel@tonic-gate #define	EPERM	1	/* Not super-user			*/
54*7c478bd9Sstevel@tonic-gate #define	ENOENT	2	/* No such file or directory		*/
55*7c478bd9Sstevel@tonic-gate #define	ESRCH	3	/* No such process			*/
56*7c478bd9Sstevel@tonic-gate #define	EINTR	4	/* interrupted system call		*/
57*7c478bd9Sstevel@tonic-gate #define	EIO	5	/* I/O error				*/
58*7c478bd9Sstevel@tonic-gate #define	ENXIO	6	/* No such device or address		*/
59*7c478bd9Sstevel@tonic-gate #define	E2BIG	7	/* Arg list too long			*/
60*7c478bd9Sstevel@tonic-gate #define	ENOEXEC	8	/* Exec format error			*/
61*7c478bd9Sstevel@tonic-gate #define	EBADF	9	/* Bad file number			*/
62*7c478bd9Sstevel@tonic-gate #define	ECHILD	10	/* No children				*/
63*7c478bd9Sstevel@tonic-gate #define	EAGAIN	11	/* Resource temporarily unavailable	*/
64*7c478bd9Sstevel@tonic-gate #define	ENOMEM	12	/* Not enough core			*/
65*7c478bd9Sstevel@tonic-gate #define	EACCES	13	/* Permission denied			*/
66*7c478bd9Sstevel@tonic-gate #define	EFAULT	14	/* Bad address				*/
67*7c478bd9Sstevel@tonic-gate #define	ENOTBLK	15	/* Block device required		*/
68*7c478bd9Sstevel@tonic-gate #define	EBUSY	16	/* Mount device busy			*/
69*7c478bd9Sstevel@tonic-gate #define	EEXIST	17	/* File exists				*/
70*7c478bd9Sstevel@tonic-gate #define	EXDEV	18	/* Cross-device link			*/
71*7c478bd9Sstevel@tonic-gate #define	ENODEV	19	/* No such device			*/
72*7c478bd9Sstevel@tonic-gate #define	ENOTDIR	20	/* Not a directory			*/
73*7c478bd9Sstevel@tonic-gate #define	EISDIR	21	/* Is a directory			*/
74*7c478bd9Sstevel@tonic-gate #define	EINVAL	22	/* Invalid argument			*/
75*7c478bd9Sstevel@tonic-gate #define	ENFILE	23	/* File table overflow			*/
76*7c478bd9Sstevel@tonic-gate #define	EMFILE	24	/* Too many open files			*/
77*7c478bd9Sstevel@tonic-gate #define	ENOTTY	25	/* Inappropriate ioctl for device	*/
78*7c478bd9Sstevel@tonic-gate #define	ETXTBSY	26	/* Text file busy			*/
79*7c478bd9Sstevel@tonic-gate #define	EFBIG	27	/* File too large			*/
80*7c478bd9Sstevel@tonic-gate #define	ENOSPC	28	/* No space left on device		*/
81*7c478bd9Sstevel@tonic-gate #define	ESPIPE	29	/* Illegal seek				*/
82*7c478bd9Sstevel@tonic-gate #define	EROFS	30	/* Read only file system		*/
83*7c478bd9Sstevel@tonic-gate #define	EMLINK	31	/* Too many links			*/
84*7c478bd9Sstevel@tonic-gate #define	EPIPE	32	/* Broken pipe				*/
85*7c478bd9Sstevel@tonic-gate #define	EDOM	33	/* Math arg out of domain of func	*/
86*7c478bd9Sstevel@tonic-gate #define	ERANGE	34	/* Math result not representable	*/
87*7c478bd9Sstevel@tonic-gate #define	ENOMSG	35	/* No message of desired type		*/
88*7c478bd9Sstevel@tonic-gate #define	EIDRM	36	/* Identifier removed			*/
89*7c478bd9Sstevel@tonic-gate #define	ECHRNG	37	/* Channel number out of range		*/
90*7c478bd9Sstevel@tonic-gate #define	EL2NSYNC 38	/* Level 2 not synchronized		*/
91*7c478bd9Sstevel@tonic-gate #define	EL3HLT	39	/* Level 3 halted			*/
92*7c478bd9Sstevel@tonic-gate #define	EL3RST	40	/* Level 3 reset			*/
93*7c478bd9Sstevel@tonic-gate #define	ELNRNG	41	/* Link number out of range		*/
94*7c478bd9Sstevel@tonic-gate #define	EUNATCH 42	/* Protocol driver not attached		*/
95*7c478bd9Sstevel@tonic-gate #define	ENOCSI	43	/* No CSI structure available		*/
96*7c478bd9Sstevel@tonic-gate #define	EL2HLT	44	/* Level 2 halted			*/
97*7c478bd9Sstevel@tonic-gate #define	EDEADLK	45	/* Deadlock condition.			*/
98*7c478bd9Sstevel@tonic-gate #define	ENOLCK	46	/* No record locks available.		*/
99*7c478bd9Sstevel@tonic-gate #define	ECANCELED 47	/* Operation canceled			*/
100*7c478bd9Sstevel@tonic-gate #define	ENOTSUP	48	/* Operation not supported		*/
101*7c478bd9Sstevel@tonic-gate 
102*7c478bd9Sstevel@tonic-gate /* Filesystem Quotas */
103*7c478bd9Sstevel@tonic-gate #define	EDQUOT	49	/* Disc quota exceeded			*/
104*7c478bd9Sstevel@tonic-gate 
105*7c478bd9Sstevel@tonic-gate /* Convergent Error Returns */
106*7c478bd9Sstevel@tonic-gate #define	EBADE	50	/* invalid exchange			*/
107*7c478bd9Sstevel@tonic-gate #define	EBADR	51	/* invalid request descriptor		*/
108*7c478bd9Sstevel@tonic-gate #define	EXFULL	52	/* exchange full			*/
109*7c478bd9Sstevel@tonic-gate #define	ENOANO	53	/* no anode				*/
110*7c478bd9Sstevel@tonic-gate #define	EBADRQC	54	/* invalid request code			*/
111*7c478bd9Sstevel@tonic-gate #define	EBADSLT	55	/* invalid slot				*/
112*7c478bd9Sstevel@tonic-gate #define	EDEADLOCK 56	/* file locking deadlock error		*/
113*7c478bd9Sstevel@tonic-gate 
114*7c478bd9Sstevel@tonic-gate #define	EBFONT	57	/* bad font file fmt			*/
115*7c478bd9Sstevel@tonic-gate 
116*7c478bd9Sstevel@tonic-gate /* Interprocess Robust Locks */
117*7c478bd9Sstevel@tonic-gate #define	EOWNERDEAD	58	/* process died with the lock */
118*7c478bd9Sstevel@tonic-gate #define	ENOTRECOVERABLE	59	/* lock is not recoverable */
119*7c478bd9Sstevel@tonic-gate 
120*7c478bd9Sstevel@tonic-gate /* stream problems */
121*7c478bd9Sstevel@tonic-gate #define	ENOSTR	60	/* Device not a stream			*/
122*7c478bd9Sstevel@tonic-gate #define	ENODATA	61	/* no data (for no delay io)		*/
123*7c478bd9Sstevel@tonic-gate #define	ETIME	62	/* timer expired			*/
124*7c478bd9Sstevel@tonic-gate #define	ENOSR	63	/* out of streams resources		*/
125*7c478bd9Sstevel@tonic-gate 
126*7c478bd9Sstevel@tonic-gate #define	ENONET	64	/* Machine is not on the network	*/
127*7c478bd9Sstevel@tonic-gate #define	ENOPKG	65	/* Package not installed		*/
128*7c478bd9Sstevel@tonic-gate #define	EREMOTE	66	/* The object is remote			*/
129*7c478bd9Sstevel@tonic-gate #define	ENOLINK	67	/* the link has been severed		*/
130*7c478bd9Sstevel@tonic-gate #define	EADV	68	/* advertise error			*/
131*7c478bd9Sstevel@tonic-gate #define	ESRMNT	69	/* srmount error			*/
132*7c478bd9Sstevel@tonic-gate 
133*7c478bd9Sstevel@tonic-gate #define	ECOMM	70	/* Communication error on send		*/
134*7c478bd9Sstevel@tonic-gate #define	EPROTO	71	/* Protocol error			*/
135*7c478bd9Sstevel@tonic-gate 
136*7c478bd9Sstevel@tonic-gate /* Interprocess Robust Locks */
137*7c478bd9Sstevel@tonic-gate #define	ELOCKUNMAPPED	72	/* locked lock was unmapped */
138*7c478bd9Sstevel@tonic-gate 
139*7c478bd9Sstevel@tonic-gate #define	ENOTACTIVE 73	/* Facility is not active		*/
140*7c478bd9Sstevel@tonic-gate #define	EMULTIHOP 74	/* multihop attempted			*/
141*7c478bd9Sstevel@tonic-gate #define	EBADMSG 77	/* trying to read unreadable message	*/
142*7c478bd9Sstevel@tonic-gate #define	ENAMETOOLONG 78	/* path name is too long		*/
143*7c478bd9Sstevel@tonic-gate #define	EOVERFLOW 79	/* value too large to be stored in data type */
144*7c478bd9Sstevel@tonic-gate #define	ENOTUNIQ 80	/* given log. name not unique		*/
145*7c478bd9Sstevel@tonic-gate #define	EBADFD	81	/* f.d. invalid for this operation	*/
146*7c478bd9Sstevel@tonic-gate #define	EREMCHG	82	/* Remote address changed		*/
147*7c478bd9Sstevel@tonic-gate 
148*7c478bd9Sstevel@tonic-gate /* shared library problems */
149*7c478bd9Sstevel@tonic-gate #define	ELIBACC	83	/* Can't access a needed shared lib.	*/
150*7c478bd9Sstevel@tonic-gate #define	ELIBBAD	84	/* Accessing a corrupted shared lib.	*/
151*7c478bd9Sstevel@tonic-gate #define	ELIBSCN	85	/* .lib section in a.out corrupted.	*/
152*7c478bd9Sstevel@tonic-gate #define	ELIBMAX	86	/* Attempting to link in too many libs.	*/
153*7c478bd9Sstevel@tonic-gate #define	ELIBEXEC 87	/* Attempting to exec a shared library.	*/
154*7c478bd9Sstevel@tonic-gate #define	EILSEQ	88	/* Illegal byte sequence.		*/
155*7c478bd9Sstevel@tonic-gate #define	ENOSYS	89	/* Unsupported file system operation	*/
156*7c478bd9Sstevel@tonic-gate #define	ELOOP	90	/* Symbolic link loop			*/
157*7c478bd9Sstevel@tonic-gate #define	ERESTART 91	/* Restartable system call		*/
158*7c478bd9Sstevel@tonic-gate #define	ESTRPIPE 92	/* if pipe/FIFO, don't sleep in stream head */
159*7c478bd9Sstevel@tonic-gate #define	ENOTEMPTY 93	/* directory not empty			*/
160*7c478bd9Sstevel@tonic-gate #define	EUSERS	94	/* Too many users (for UFS)		*/
161*7c478bd9Sstevel@tonic-gate 
162*7c478bd9Sstevel@tonic-gate /* BSD Networking Software */
163*7c478bd9Sstevel@tonic-gate 	/* argument errors */
164*7c478bd9Sstevel@tonic-gate #define	ENOTSOCK	95	/* Socket operation on non-socket */
165*7c478bd9Sstevel@tonic-gate #define	EDESTADDRREQ	96	/* Destination address required */
166*7c478bd9Sstevel@tonic-gate #define	EMSGSIZE	97	/* Message too long */
167*7c478bd9Sstevel@tonic-gate #define	EPROTOTYPE	98	/* Protocol wrong type for socket */
168*7c478bd9Sstevel@tonic-gate #define	ENOPROTOOPT	99	/* Protocol not available */
169*7c478bd9Sstevel@tonic-gate #define	EPROTONOSUPPORT	120	/* Protocol not supported */
170*7c478bd9Sstevel@tonic-gate #define	ESOCKTNOSUPPORT	121	/* Socket type not supported */
171*7c478bd9Sstevel@tonic-gate #define	EOPNOTSUPP	122	/* Operation not supported on socket */
172*7c478bd9Sstevel@tonic-gate #define	EPFNOSUPPORT	123	/* Protocol family not supported */
173*7c478bd9Sstevel@tonic-gate #define	EAFNOSUPPORT	124	/* Address family not supported by */
174*7c478bd9Sstevel@tonic-gate 				/* protocol family */
175*7c478bd9Sstevel@tonic-gate #define	EADDRINUSE	125	/* Address already in use */
176*7c478bd9Sstevel@tonic-gate #define	EADDRNOTAVAIL	126	/* Can't assign requested address */
177*7c478bd9Sstevel@tonic-gate 	/* operational errors */
178*7c478bd9Sstevel@tonic-gate #define	ENETDOWN	127	/* Network is down */
179*7c478bd9Sstevel@tonic-gate #define	ENETUNREACH	128	/* Network is unreachable */
180*7c478bd9Sstevel@tonic-gate #define	ENETRESET	129	/* Network dropped connection because */
181*7c478bd9Sstevel@tonic-gate 				/* of reset */
182*7c478bd9Sstevel@tonic-gate #define	ECONNABORTED	130	/* Software caused connection abort */
183*7c478bd9Sstevel@tonic-gate #define	ECONNRESET	131	/* Connection reset by peer */
184*7c478bd9Sstevel@tonic-gate #define	ENOBUFS		132	/* No buffer space available */
185*7c478bd9Sstevel@tonic-gate #define	EISCONN		133	/* Socket is already connected */
186*7c478bd9Sstevel@tonic-gate #define	ENOTCONN	134	/* Socket is not connected */
187*7c478bd9Sstevel@tonic-gate /* XENIX has 135 - 142 */
188*7c478bd9Sstevel@tonic-gate #define	ESHUTDOWN	143	/* Can't send after socket shutdown */
189*7c478bd9Sstevel@tonic-gate #define	ETOOMANYREFS	144	/* Too many references: can't splice */
190*7c478bd9Sstevel@tonic-gate #define	ETIMEDOUT	145	/* Connection timed out */
191*7c478bd9Sstevel@tonic-gate #define	ECONNREFUSED	146	/* Connection refused */
192*7c478bd9Sstevel@tonic-gate #define	EHOSTDOWN	147	/* Host is down */
193*7c478bd9Sstevel@tonic-gate #define	EHOSTUNREACH	148	/* No route to host */
194*7c478bd9Sstevel@tonic-gate #define	EWOULDBLOCK	EAGAIN
195*7c478bd9Sstevel@tonic-gate #define	EALREADY	149	/* operation already in progress */
196*7c478bd9Sstevel@tonic-gate #define	EINPROGRESS	150	/* operation now in progress */
197*7c478bd9Sstevel@tonic-gate 
198*7c478bd9Sstevel@tonic-gate /* SUN Network File System */
199*7c478bd9Sstevel@tonic-gate #define	ESTALE		151	/* Stale NFS file handle */
200*7c478bd9Sstevel@tonic-gate 
201*7c478bd9Sstevel@tonic-gate 
202*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
203*7c478bd9Sstevel@tonic-gate }
204*7c478bd9Sstevel@tonic-gate #endif
205*7c478bd9Sstevel@tonic-gate 
206*7c478bd9Sstevel@tonic-gate #endif	/* _SYS_ERRNO_H */
207