xref: /original-bsd/sys/sys/errno.h (revision c0f053f7)
1 /*
2  * Copyright (c) 1982, 1986, 1989 Regents of the University of California.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms are permitted
6  * provided that the above copyright notice and this paragraph are
7  * duplicated in all such forms and that any documentation,
8  * advertising materials, and other materials related to such
9  * distribution and use acknowledge that the software was developed
10  * by the University of California, Berkeley.  The name of the
11  * University may not be used to endorse or promote products derived
12  * from this software without specific prior written permission.
13  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16  *
17  *	@(#)errno.h	7.4 (Berkeley) 05/24/89
18  */
19 
20 #define	EPERM		1		/* Operation not permitted */
21 #define	ENOENT		2		/* No such file or directory */
22 #define	ESRCH		3		/* No such process */
23 #define	EINTR		4		/* Interrupted function call */
24 #define	EIO		5		/* Input/output error */
25 #define	ENXIO		6		/* No such device or address */
26 #define	E2BIG		7		/* Arg list too long */
27 #define	ENOEXEC		8		/* Exec format error */
28 #define	EBADF		9		/* Bad file descriptor */
29 #define	ECHILD		10		/* No child processes */
30 					/* 11 - was EAGAIN */
31 #define	ENOMEM		12		/* Not enough space */
32 #define	EACCES		13		/* Permission denied */
33 #define	EFAULT		14		/* Bad address */
34 #ifndef _POSIX_SOURCE
35 #define	ENOTBLK		15		/* Block device required */
36 #endif
37 #define	EBUSY		16		/* Resource busy */
38 #define	EEXIST		17		/* File exists */
39 #define	EXDEV		18		/* Improper link */
40 #define	ENODEV		19		/* No such device */
41 #define	ENOTDIR		20		/* Not a directory */
42 #define	EISDIR		21		/* Is a directory */
43 #define	EINVAL		22		/* Invalid argument */
44 #define	ENFILE		23		/* Too many open files in system */
45 #define	EMFILE		24		/* Too many open files */
46 #define	ENOTTY		25		/* Inappropriate I/O control op. */
47 #ifndef _POSIX_SOURCE
48 #define	ETXTBSY		26		/* Text file busy */
49 #endif
50 #define	EFBIG		27		/* File too large */
51 #define	ENOSPC		28		/* No space left on device */
52 #define	ESPIPE		29		/* Invalid seek */
53 #define	EROFS		30		/* Read-only file system */
54 #define	EMLINK		31		/* Too many links */
55 #define	EPIPE		32		/* Broken pipe */
56 
57 /* math software */
58 #define	EDOM		33		/* Domain error */
59 #define	ERANGE		34		/* Result too large */
60 
61 /* non-blocking and interrupt i/o */
62 #ifndef _POSIX_SOURCE
63 #define	EWOULDBLOCK	35		/* Operation would block */
64 #endif
65 #define	EDEADLK		EWOULDBLOCK	/* Resource deadlock avoided */
66 #define	EAGAIN		EWOULDBLOCK	/* Resource temporarily unavailable */
67 #ifndef _POSIX_SOURCE
68 #define	EINPROGRESS	36		/* Operation now in progress */
69 #define	EALREADY	37		/* Operation already in progress */
70 
71 /* ipc/network software */
72 
73 	/* argument errors */
74 #define	ENOTSOCK	38		/* Socket operation on non-socket */
75 #define	EDESTADDRREQ	39		/* Destination address required */
76 #define	EMSGSIZE	40		/* Message too long */
77 #define	EPROTOTYPE	41		/* Protocol wrong type for socket */
78 #define	ENOPROTOOPT	42		/* Protocol not available */
79 #define	EPROTONOSUPPORT	43		/* Protocol not supported */
80 #define	ESOCKTNOSUPPORT	44		/* Socket type not supported */
81 #define	EOPNOTSUPP	45		/* Operation not supported on socket */
82 #define	EPFNOSUPPORT	46		/* Protocol family not supported */
83 #define	EAFNOSUPPORT	47		/* Address family not supported by protocol family */
84 #define	EADDRINUSE	48		/* Address already in use */
85 #define	EADDRNOTAVAIL	49		/* Can't assign requested address */
86 
87 	/* operational errors */
88 #define	ENETDOWN	50		/* Network is down */
89 #define	ENETUNREACH	51		/* Network is unreachable */
90 #define	ENETRESET	52		/* Network dropped connection on reset */
91 #define	ECONNABORTED	53		/* Software caused connection abort */
92 #define	ECONNRESET	54		/* Connection reset by peer */
93 #define	ENOBUFS		55		/* No buffer space available */
94 #define	EISCONN		56		/* Socket is already connected */
95 #define	ENOTCONN	57		/* Socket is not connected */
96 #define	ESHUTDOWN	58		/* Can't send after socket shutdown */
97 #define	ETOOMANYREFS	59		/* Too many references: can't splice */
98 #define	ETIMEDOUT	60		/* Connection timed out */
99 #define	ECONNREFUSED	61		/* Connection refused */
100 
101 	/* */
102 #define	ELOOP		62		/* Too many levels of symbolic links */
103 #endif
104 #define	ENAMETOOLONG	63		/* Filename too long */
105 
106 /* should be rearranged */
107 #ifndef _POSIX_SOURCE
108 #define	EHOSTDOWN	64		/* Host is down */
109 #define	EHOSTUNREACH	65		/* No route to host */
110 #endif
111 #define	ENOTEMPTY	66		/* Directory not empty */
112 
113 /* quotas & mush */
114 #ifndef _POSIX_SOURCE
115 #define	EPROCLIM	67		/* Too many processes */
116 #define	EUSERS		68		/* Too many users */
117 #define	EDQUOT		69		/* Disc quota exceeded */
118 
119 /* Network File System */
120 #define	ESTALE		70		/* Stale NFS file handle */
121 #define	EREMOTE		71		/* Too many levels of remote in path */
122 #define	EBADRPC		72		/* RPC struct is bad */
123 #define	ERPCMISMATCH	73		/* RPC version wrong */
124 #define	EPROGUNAVAIL	74		/* RPC prog. not avail */
125 #define	EPROGMISMATCH	75		/* Program version wrong */
126 #define	EPROCUNAVAIL	76		/* Bad procedure for program */
127 #endif
128 
129 #define	ENOLCK		77		/* No locks available */
130 #define	ENOSYS		78		/* Function not implemented */
131