17c478bdstevel@tonic-gate/*
27c478bdstevel@tonic-gate * CDDL HEADER START
37c478bdstevel@tonic-gate *
47c478bdstevel@tonic-gate * The contents of this file are subject to the terms of the
57c478bdstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only
67c478bdstevel@tonic-gate * (the "License").  You may not use this file except in compliance
77c478bdstevel@tonic-gate * with the License.
87c478bdstevel@tonic-gate *
97c478bdstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
107c478bdstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
117c478bdstevel@tonic-gate * See the License for the specific language governing permissions
127c478bdstevel@tonic-gate * and limitations under the License.
137c478bdstevel@tonic-gate *
147c478bdstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
157c478bdstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
167c478bdstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
177c478bdstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
187c478bdstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
197c478bdstevel@tonic-gate *
207c478bdstevel@tonic-gate * CDDL HEADER END
217c478bdstevel@tonic-gate */
227c478bdstevel@tonic-gate/*
237c478bdstevel@tonic-gate * Copyright 1989 Sun Microsystems, Inc.  All rights reserved.
247c478bdstevel@tonic-gate * Use is subject to license terms.
257c478bdstevel@tonic-gate */
267c478bdstevel@tonic-gate
277c478bdstevel@tonic-gate/*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
287c478bdstevel@tonic-gate/*	  All Rights Reserved  	*/
297c478bdstevel@tonic-gate
307c478bdstevel@tonic-gate/*
317c478bdstevel@tonic-gate * Portions of this source code were derived from Berkeley 4.3 BSD
327c478bdstevel@tonic-gate * under license from the Regents of the University of California.
337c478bdstevel@tonic-gate */
347c478bdstevel@tonic-gate
357c478bdstevel@tonic-gate#ifndef _SYS_ERRNO_H
367c478bdstevel@tonic-gate#define _SYS_ERRNO_H
377c478bdstevel@tonic-gate
387c478bdstevel@tonic-gate#ident	"%Z%%M%	%I%	%E% SMI"
397c478bdstevel@tonic-gate
407c478bdstevel@tonic-gate/*
417c478bdstevel@tonic-gate * Error codes
427c478bdstevel@tonic-gate */
437c478bdstevel@tonic-gate
447c478bdstevel@tonic-gate#define	EPERM	1	/* Not super-user			*/
457c478bdstevel@tonic-gate#define	ENOENT	2	/* No such file or directory		*/
467c478bdstevel@tonic-gate#define	ESRCH	3	/* No such process			*/
477c478bdstevel@tonic-gate#define	EINTR	4	/* interrupted system call		*/
487c478bdstevel@tonic-gate#define	EIO	5	/* I/O error				*/
497c478bdstevel@tonic-gate#define	ENXIO	6	/* No such device or address		*/
507c478bdstevel@tonic-gate#define	E2BIG	7	/* Arg list too long			*/
517c478bdstevel@tonic-gate#define	ENOEXEC	8	/* Exec format error			*/
527c478bdstevel@tonic-gate#define	EBADF	9	/* Bad file number			*/
537c478bdstevel@tonic-gate#define	ECHILD	10	/* No children				*/
547c478bdstevel@tonic-gate#define	EAGAIN	11	/* No more processes			*/
557c478bdstevel@tonic-gate#define	ENOMEM	12	/* Not enough core			*/
567c478bdstevel@tonic-gate#define	EACCES	13	/* Permission denied			*/
577c478bdstevel@tonic-gate#define	EFAULT	14	/* Bad address				*/
587c478bdstevel@tonic-gate#define	ENOTBLK	15	/* Block device required		*/
597c478bdstevel@tonic-gate#define	EBUSY	16	/* Mount device busy			*/
607c478bdstevel@tonic-gate#define	EEXIST	17	/* File exists				*/
617c478bdstevel@tonic-gate#define	EXDEV	18	/* Cross-device link			*/
627c478bdstevel@tonic-gate#define	ENODEV	19	/* No such device			*/
637c478bdstevel@tonic-gate#define	ENOTDIR	20	/* Not a directory			*/
647c478bdstevel@tonic-gate#define	EISDIR	21	/* Is a directory			*/
657c478bdstevel@tonic-gate#define	EINVAL	22	/* Invalid argument			*/
667c478bdstevel@tonic-gate#define	ENFILE	23	/* File table overflow			*/
677c478bdstevel@tonic-gate#define	EMFILE	24	/* Too many open files			*/
687c478bdstevel@tonic-gate#define	ENOTTY	25	/* Not a typewriter			*/
697c478bdstevel@tonic-gate#define	ETXTBSY	26	/* Text file busy			*/
707c478bdstevel@tonic-gate#define	EFBIG	27	/* File too large			*/
717c478bdstevel@tonic-gate#define	ENOSPC	28	/* No space left on device		*/
727c478bdstevel@tonic-gate#define	ESPIPE	29	/* Illegal seek				*/
737c478bdstevel@tonic-gate#define	EROFS	30	/* Read only file system		*/
747c478bdstevel@tonic-gate#define	EMLINK	31	/* Too many links			*/
757c478bdstevel@tonic-gate#define	EPIPE	32	/* Broken pipe				*/
767c478bdstevel@tonic-gate#define	EDOM	33	/* Math arg out of domain of func	*/
777c478bdstevel@tonic-gate#define	ERANGE	34	/* Math result not representable	*/
787c478bdstevel@tonic-gate#define	ENOMSG	35	/* No message of desired type		*/
797c478bdstevel@tonic-gate#define	EIDRM	36	/* Identifier removed			*/
807c478bdstevel@tonic-gate#define	ECHRNG	37	/* Channel number out of range		*/
817c478bdstevel@tonic-gate#define	EL2NSYNC 38	/* Level 2 not synchronized		*/
827c478bdstevel@tonic-gate#define	EL3HLT	39	/* Level 3 halted			*/
837c478bdstevel@tonic-gate#define	EL3RST	40	/* Level 3 reset			*/
847c478bdstevel@tonic-gate#define	ELNRNG	41	/* Link number out of range		*/
857c478bdstevel@tonic-gate#define	EUNATCH 42	/* Protocol driver not attached		*/
867c478bdstevel@tonic-gate#define	ENOCSI	43	/* No CSI structure available		*/
877c478bdstevel@tonic-gate#define	EL2HLT	44	/* Level 2 halted			*/
887c478bdstevel@tonic-gate#define	EDEADLK	45	/* Deadlock condition.			*/
897c478bdstevel@tonic-gate#define	ENOLCK	46	/* No record locks available.		*/
907c478bdstevel@tonic-gate
917c478bdstevel@tonic-gate/* Filesystem Quotas */
927c478bdstevel@tonic-gate#define	EDQUOT	49	/* Disc quota exceeded			*/
937c478bdstevel@tonic-gate
947c478bdstevel@tonic-gate/* Convergent Error Returns */
957c478bdstevel@tonic-gate#define EBADE	50	/* invalid exchange			*/
967c478bdstevel@tonic-gate#define EBADR	51	/* invalid request descriptor		*/
977c478bdstevel@tonic-gate#define EXFULL	52	/* exchange full			*/
987c478bdstevel@tonic-gate#define ENOANO	53	/* no anode				*/
997c478bdstevel@tonic-gate#define EBADRQC	54	/* invalid request code			*/
1007c478bdstevel@tonic-gate#define EBADSLT	55	/* invalid slot				*/
1017c478bdstevel@tonic-gate#define EDEADLOCK 56	/* file locking deadlock error		*/
1027c478bdstevel@tonic-gate
1037c478bdstevel@tonic-gate#define EBFONT	57	/* bad font file fmt			*/
1047c478bdstevel@tonic-gate
1057c478bdstevel@tonic-gate/* stream problems */
1067c478bdstevel@tonic-gate#define ENOSTR	60	/* Device not a stream			*/
1077c478bdstevel@tonic-gate#define ENODATA	61	/* no data (for no delay io)		*/
1087c478bdstevel@tonic-gate#define ETIME	62	/* timer expired			*/
1097c478bdstevel@tonic-gate#define ENOSR	63	/* out of streams resources		*/
1107c478bdstevel@tonic-gate
1117c478bdstevel@tonic-gate#define ENONET	64	/* Machine is not on the network	*/
1127c478bdstevel@tonic-gate#define ENOPKG	65	/* Package not installed                */
1137c478bdstevel@tonic-gate#define EREMOTE	66	/* The object is remote			*/
1147c478bdstevel@tonic-gate#define ENOLINK	67	/* the link has been severed */
1157c478bdstevel@tonic-gate#define EADV	68	/* advertise error */
1167c478bdstevel@tonic-gate#define ESRMNT	69	/* srmount error */
1177c478bdstevel@tonic-gate
1187c478bdstevel@tonic-gate#define	ECOMM	70	/* Communication error on send		*/
1197c478bdstevel@tonic-gate#define EPROTO	71	/* Protocol error			*/
1207c478bdstevel@tonic-gate#define	EMULTIHOP 74	/* multihop attempted */
1217c478bdstevel@tonic-gate#define EBADMSG 77	/* trying to read unreadable message	*/
1227c478bdstevel@tonic-gate#define ENAMETOOLONG 78	/* path name is too long */
1237c478bdstevel@tonic-gate#define EOVERFLOW 79	/* value too large to be stored in data type */
1247c478bdstevel@tonic-gate#define ENOTUNIQ 80	/* given log. name not unique */
1257c478bdstevel@tonic-gate#define EBADFD	 81	/* f.d. invalid for this operation */
1267c478bdstevel@tonic-gate#define EREMCHG	 82	/* Remote address changed */
1277c478bdstevel@tonic-gate
1287c478bdstevel@tonic-gate/* shared library problems */
1297c478bdstevel@tonic-gate#define ELIBACC	83	/* Can't access a needed shared lib.	*/
1307c478bdstevel@tonic-gate#define ELIBBAD	84	/* Accessing a corrupted shared lib.	*/
1317c478bdstevel@tonic-gate#define ELIBSCN	85	/* .lib section in a.out corrupted.	*/
1327c478bdstevel@tonic-gate#define ELIBMAX	86	/* Attempting to link in too many libs.	*/
1337c478bdstevel@tonic-gate#define ELIBEXEC 87	/* Attempting to exec a shared library.	*/
1347c478bdstevel@tonic-gate#define	EILSEQ 88	/* Illegal byte sequence. */
1357c478bdstevel@tonic-gate#define ENOSYS 89	/* Unsupported file system operation */
1367c478bdstevel@tonic-gate#define ELOOP	90	/* Symbolic link loop */
1377c478bdstevel@tonic-gate#define	ERESTART 91	/* Restartable system call */
1387c478bdstevel@tonic-gate#define ESTRPIPE 92	/* if pipe/FIFO, don't sleep in stream head */
1397c478bdstevel@tonic-gate#define ENOTEMPTY 93	/* directory not empty */
1407c478bdstevel@tonic-gate#define EUSERS	94	/* Too many users (for UFS) */
1417c478bdstevel@tonic-gate
1427c478bdstevel@tonic-gate/* BSD Networking Software */
1437c478bdstevel@tonic-gate	/* argument errors */
1447c478bdstevel@tonic-gate#define	ENOTSOCK	95		/* Socket operation on non-socket */
1457c478bdstevel@tonic-gate#define	EDESTADDRREQ	96		/* Destination address required */
1467c478bdstevel@tonic-gate#define	EMSGSIZE	97		/* Message too long */
1477c478bdstevel@tonic-gate#define	EPROTOTYPE	98		/* Protocol wrong type for socket */
1487c478bdstevel@tonic-gate#define	ENOPROTOOPT	99		/* Protocol not available */
1497c478bdstevel@tonic-gate#define	EPROTONOSUPPORT	120		/* Protocol not supported */
1507c478bdstevel@tonic-gate#define	ESOCKTNOSUPPORT	121		/* Socket type not supported */
1517c478bdstevel@tonic-gate#define	EOPNOTSUPP	122		/* Operation not supported on socket */
1527c478bdstevel@tonic-gate#define	EPFNOSUPPORT	123		/* Protocol family not supported */
1537c478bdstevel@tonic-gate#define	EAFNOSUPPORT	124		/* Address family not supported by
1547c478bdstevel@tonic-gate					   protocol family */
1557c478bdstevel@tonic-gate#define	EADDRINUSE	125		/* Address already in use */
1567c478bdstevel@tonic-gate#define	EADDRNOTAVAIL	126		/* Can't assign requested address */
1577c478bdstevel@tonic-gate	/* operational errors */
1587c478bdstevel@tonic-gate#define	ENETDOWN	127		/* Network is down */
1597c478bdstevel@tonic-gate#define	ENETUNREACH	128		/* Network is unreachable */
1607c478bdstevel@tonic-gate#define	ENETRESET	129		/* Network dropped connection because
1617c478bdstevel@tonic-gate					   of reset */
1627c478bdstevel@tonic-gate#define	ECONNABORTED	130		/* Software caused connection abort */
1637c478bdstevel@tonic-gate#define	ECONNRESET	131		/* Connection reset by peer */
1647c478bdstevel@tonic-gate#define	ENOBUFS		132	       	/* No buffer space available */
1657c478bdstevel@tonic-gate#define	EISCONN		133		/* Socket is already connected */
1667c478bdstevel@tonic-gate#define	ENOTCONN	134		/* Socket is not connected */
1677c478bdstevel@tonic-gate/* XENIX has 135 - 142 */
1687c478bdstevel@tonic-gate#define	ESHUTDOWN	143		/* Can't send after socket shutdown */
1697c478bdstevel@tonic-gate#define	ETOOMANYREFS	144		/* Too many references: can't splice */
1707c478bdstevel@tonic-gate#define	ETIMEDOUT	145		/* Connection timed out */
1717c478bdstevel@tonic-gate#define	ECONNREFUSED	146		/* Connection refused */
1727c478bdstevel@tonic-gate#define	EHOSTDOWN	147		/* Host is down */
1737c478bdstevel@tonic-gate#define	EHOSTUNREACH	148		/* No route to host */
1747c478bdstevel@tonic-gate#define EWOULDBLOCK	EAGAIN
1757c478bdstevel@tonic-gate#define EALREADY	149		/* operation already in progress */
1767c478bdstevel@tonic-gate#define EINPROGRESS	150		/* operation now in progress */
1777c478bdstevel@tonic-gate
1787c478bdstevel@tonic-gate/* SUN Network File System */
1797c478bdstevel@tonic-gate#define	ESTALE		151		/* Stale NFS file handle */
1807c478bdstevel@tonic-gate
1817c478bdstevel@tonic-gate#ifdef XENIX_MERGE
1827c478bdstevel@tonic-gate/* XENIX error numbers */
1837c478bdstevel@tonic-gate#define EUCLEAN 	135	/* Structure needs cleaning */
1847c478bdstevel@tonic-gate#define	ENOTNAM		137	/* Not a XENIX named type file */
1857c478bdstevel@tonic-gate#define	ENAVAIL		138	/* No XENIX semaphores available */
1867c478bdstevel@tonic-gate#define	EISNAM		139	/* Is a named type file */
1877c478bdstevel@tonic-gate#define EREMOTEIO	140	/* Remote I/O error */
1887c478bdstevel@tonic-gate#define EINIT		141	/* Reserved for future */
1897c478bdstevel@tonic-gate#define EREMDEV		142	/* Error 142 */
1907c478bdstevel@tonic-gate#endif /* XENIX_MERGE */
1917c478bdstevel@tonic-gate
1927c478bdstevel@tonic-gate#endif	/* _SYS_ERRNO_H */
193