xref: /titanic_50/usr/src/lib/libbc/inc/include/sys/errno.h (revision 711890bc9379ceea66272dc8d4981812224ea86e)
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 1993 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #pragma ident	"%Z%%M%	%I%	%E% SMI"
28 
29 /*
30  * If error codes are added or changed here, they should be updated in
31  * /usr/src/lib/libc/gen/common/errlst.c as well.
32  */
33 
34 /*
35  * Error codes
36  */
37 
38 #ifndef _sys_errno_h
39 #define _sys_errno_h
40 
41 #define	EPERM		1		/* Not owner */
42 #define	ENOENT		2		/* No such file or directory */
43 #define	ESRCH		3		/* No such process */
44 #define	EINTR		4		/* Interrupted system call */
45 #define	EIO		5		/* I/O error */
46 #define	ENXIO		6		/* No such device or address */
47 #define	E2BIG		7		/* Arg list too long */
48 #define	ENOEXEC		8		/* Exec format error */
49 #define	EBADF		9		/* Bad file number */
50 #define	ECHILD		10		/* No children */
51 #define	EAGAIN		11		/* No more processes */
52 #define	ENOMEM		12		/* Not enough core */
53 #define	EACCES		13		/* Permission denied */
54 #define	EFAULT		14		/* Bad address */
55 #define	ENOTBLK		15		/* Block device required */
56 #define	EBUSY		16		/* Mount device busy */
57 #define	EEXIST		17		/* File exists */
58 #define	EXDEV		18		/* Cross-device link */
59 #define	ENODEV		19		/* No such device */
60 #define	ENOTDIR		20		/* Not a directory*/
61 #define	EISDIR		21		/* Is a directory */
62 #define	EINVAL		22		/* Invalid argument */
63 #define	ENFILE		23		/* File table overflow */
64 #define	EMFILE		24		/* Too many open files */
65 #define	ENOTTY		25		/* Not a typewriter */
66 #define	ETXTBSY		26		/* Text file busy */
67 #define	EFBIG		27		/* File too large */
68 #define	ENOSPC		28		/* No space left on device */
69 #define	ESPIPE		29		/* Illegal seek */
70 #define	EROFS		30		/* Read-only file system */
71 #define	EMLINK		31		/* Too many links */
72 #define	EPIPE		32		/* Broken pipe */
73 
74 /* math software */
75 #define	EDOM		33		/* Argument too large */
76 #define	ERANGE		34		/* Result too large */
77 
78 /* non-blocking and interrupt i/o */
79 #define	EWOULDBLOCK	35		/* Operation would block */
80 #define	EINPROGRESS	36		/* Operation now in progress */
81 #define	EALREADY	37		/* Operation already in progress */
82 /* ipc/network software */
83 
84 	/* argument errors */
85 #define	ENOTSOCK	38		/* Socket operation on non-socket */
86 #define	EDESTADDRREQ	39		/* Destination address required */
87 #define	EMSGSIZE	40		/* Message too long */
88 #define	EPROTOTYPE	41		/* Protocol wrong type for socket */
89 #define	ENOPROTOOPT	42		/* Protocol not available */
90 #define	EPROTONOSUPPORT	43		/* Protocol not supported */
91 #define	ESOCKTNOSUPPORT	44		/* Socket type not supported */
92 #define	EOPNOTSUPP	45		/* Operation not supported on socket */
93 #define	EPFNOSUPPORT	46		/* Protocol family not supported */
94 #define	EAFNOSUPPORT	47		/* Address family not supported by protocol family */
95 #define	EADDRINUSE	48		/* Address already in use */
96 #define	EADDRNOTAVAIL	49		/* Can't assign requested address */
97 
98 	/* operational errors */
99 #define	ENETDOWN	50		/* Network is down */
100 #define	ENETUNREACH	51		/* Network is unreachable */
101 #define	ENETRESET	52		/* Network dropped connection on reset */
102 #define	ECONNABORTED	53		/* Software caused connection abort */
103 #define	ECONNRESET	54		/* Connection reset by peer */
104 #define	ENOBUFS		55		/* No buffer space available */
105 #define	EISCONN		56		/* Socket is already connected */
106 #define	ENOTCONN	57		/* Socket is not connected */
107 #define	ESHUTDOWN	58		/* Can't send after socket shutdown */
108 #define	ETOOMANYREFS	59		/* Too many references: can't splice */
109 #define	ETIMEDOUT	60		/* Connection timed out */
110 #define	ECONNREFUSED	61		/* Connection refused */
111 
112 	/* */
113 #define	ELOOP		62		/* Too many levels of symbolic links */
114 #define	ENAMETOOLONG	63		/* File name too long */
115 
116 /* should be rearranged */
117 #define	EHOSTDOWN	64		/* Host is down */
118 #define	EHOSTUNREACH	65		/* No route to host */
119 #define	ENOTEMPTY	66		/* Directory not empty */
120 
121 /* quotas & mush */
122 #define	EPROCLIM	67		/* Too many processes */
123 #define	EUSERS		68		/* Too many users */
124 #define	EDQUOT		69		/* Disc quota exceeded */
125 
126 /* Network File System */
127 #define	ESTALE		70		/* Stale NFS file handle */
128 #define	EREMOTE		71		/* Too many levels of remote in path */
129 
130 /* streams */
131 #define	ENOSTR		72		/* Device is not a stream */
132 #define	ETIME		73		/* Timer expired */
133 #define	ENOSR		74		/* Out of streams resources */
134 #define	ENOMSG		75		/* No message of desired type */
135 #define	EBADMSG		76		/* Trying to read unreadable message */
136 
137 /* SystemV IPC */
138 #define EIDRM		77		/* Identifier removed */
139 
140 /* SystemV Record Locking */
141 #define EDEADLK		78		/* Deadlock condition. */
142 #define ENOLCK		79		/* No record locks available. */
143 
144 /* POSIX */
145 #define ENOSYS		90		/* function not implemented */
146 
147 #endif /*!_sys_errno_h*/
148