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