Subversion Repositories tendra.SVN

Rev

Rev 73 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
71 7u83 1
#ifndef __TENDRA_ERRNO_H
2
#define __TENDRA_ERRNO_H
3
 
72 7u83 4
#undef _STANDALONE
5
#undef _KERNEL
6
/*#include_next <errno.h>*/
7
 
8
/*extern int errno;*/
9
/*#define	EDOM		33	*/	/* Numerical argument out of domain */
10
/* #define	ERANGE		34	*/	/* Result too large */
11
 
12
#define	EPERM		1		/* Operation not permitted */
13
#define	ENOENT		2		/* No such file or directory */
14
#define	ESRCH		3		/* No such process */
15
#define	EINTR		4		/* Interrupted system call */
16
#define	EIO		5		/* Input/output error */
17
#define	ENXIO		6		/* Device not configured */
18
#define	E2BIG		7		/* Argument list too long */
19
#define	ENOEXEC		8		/* Exec format error */
20
#define	EBADF		9		/* Bad file descriptor */
21
#define	ECHILD		10		/* No child processes */
22
#define	EDEADLK		11		/* Resource deadlock avoided */
23
					/* 11 was EAGAIN */
24
#define	ENOMEM		12		/* Cannot allocate memory */
25
#define	EACCES		13		/* Permission denied */
26
#define	EFAULT		14		/* Bad address */
27
#ifndef _POSIX_SOURCE
28
#define	ENOTBLK		15		/* Block device required */
29
#endif
30
#define	EBUSY		16		/* Device busy */
31
#define	EEXIST		17		/* File exists */
32
#define	EXDEV		18		/* Cross-device link */
33
#define	ENODEV		19		/* Operation not supported by device */
34
#define	ENOTDIR		20		/* Not a directory */
35
#define	EISDIR		21		/* Is a directory */
36
#define	EINVAL		22		/* Invalid argument */
37
#define	ENFILE		23		/* Too many open files in system */
38
#define	EMFILE		24		/* Too many open files */
39
#define	ENOTTY		25		/* Inappropriate ioctl for device */
40
#ifndef _POSIX_SOURCE
41
#define	ETXTBSY		26		/* Text file busy */
42
#endif
43
#define	EFBIG		27		/* File too large */
44
#define	ENOSPC		28		/* No space left on device */
45
#define	ESPIPE		29		/* Illegal seek */
46
#define	EROFS		30		/* Read-only filesystem */
47
#define	EMLINK		31		/* Too many links */
48
#define	EPIPE		32		/* Broken pipe */
49
 
50
/* math software */
71 7u83 51
#define	EDOM		33		/* Numerical argument out of domain */
52
#define	ERANGE		34		/* Result too large */
53
 
72 7u83 54
/* non-blocking and interrupt i/o */
55
#define	EAGAIN		35		/* Resource temporarily unavailable */
56
#ifndef _POSIX_SOURCE
57
#define	EWOULDBLOCK	EAGAIN		/* Operation would block */
58
#define	EINPROGRESS	36		/* Operation now in progress */
59
#define	EALREADY	37		/* Operation already in progress */
71 7u83 60
 
72 7u83 61
/* ipc/network software -- argument errors */
62
#define	ENOTSOCK	38		/* Socket operation on non-socket */
63
#define	EDESTADDRREQ	39		/* Destination address required */
64
#define	EMSGSIZE	40		/* Message too long */
65
#define	EPROTOTYPE	41		/* Protocol wrong type for socket */
66
#define	ENOPROTOOPT	42		/* Protocol not available */
67
#define	EPROTONOSUPPORT	43		/* Protocol not supported */
68
#define	ESOCKTNOSUPPORT	44		/* Socket type not supported */
69
#define	EOPNOTSUPP	45		/* Operation not supported */
70
#define	ENOTSUP		EOPNOTSUPP	/* Operation not supported */
71
#define	EPFNOSUPPORT	46		/* Protocol family not supported */
72
#define	EAFNOSUPPORT	47		/* Address family not supported by protocol family */
73
#define	EADDRINUSE	48		/* Address already in use */
74
#define	EADDRNOTAVAIL	49		/* Can't assign requested address */
75
 
76
/* ipc/network software -- operational errors */
77
#define	ENETDOWN	50		/* Network is down */
78
#define	ENETUNREACH	51		/* Network is unreachable */
79
#define	ENETRESET	52		/* Network dropped connection on reset */
80
#define	ECONNABORTED	53		/* Software caused connection abort */
81
#define	ECONNRESET	54		/* Connection reset by peer */
82
#define	ENOBUFS		55		/* No buffer space available */
83
#define	EISCONN		56		/* Socket is already connected */
84
#define	ENOTCONN	57		/* Socket is not connected */
85
#define	ESHUTDOWN	58		/* Can't send after socket shutdown */
86
#define	ETOOMANYREFS	59		/* Too many references: can't splice */
87
#define	ETIMEDOUT	60		/* Operation timed out */
88
#define	ECONNREFUSED	61		/* Connection refused */
89
 
90
#define	ELOOP		62		/* Too many levels of symbolic links */
91
#endif /* _POSIX_SOURCE */
92
#define	ENAMETOOLONG	63		/* File name too long */
93
 
94
/* should be rearranged */
95
#ifndef _POSIX_SOURCE
96
#define	EHOSTDOWN	64		/* Host is down */
97
#define	EHOSTUNREACH	65		/* No route to host */
98
#endif /* _POSIX_SOURCE */
99
#define	ENOTEMPTY	66		/* Directory not empty */
100
 
101
/* quotas & mush */
102
#ifndef _POSIX_SOURCE
103
#define	EPROCLIM	67		/* Too many processes */
104
#define	EUSERS		68		/* Too many users */
105
#define	EDQUOT		69		/* Disc quota exceeded */
106
 
107
/* Network File System */
108
#define	ESTALE		70		/* Stale NFS file handle */
109
#define	EREMOTE		71		/* Too many levels of remote in path */
110
#define	EBADRPC		72		/* RPC struct is bad */
111
#define	ERPCMISMATCH	73		/* RPC version wrong */
112
#define	EPROGUNAVAIL	74		/* RPC prog. not avail */
113
#define	EPROGMISMATCH	75		/* Program version wrong */
114
#define	EPROCUNAVAIL	76		/* Bad procedure for program */
115
#endif /* _POSIX_SOURCE */
116
 
117
#define	ENOLCK		77		/* No locks available */
118
#define	ENOSYS		78		/* Function not implemented */
119
 
120
#ifndef _POSIX_SOURCE
121
#define	EFTYPE		79		/* Inappropriate file type or format */
122
#define	EAUTH		80		/* Authentication error */
123
#define	ENEEDAUTH	81		/* Need authenticator */
124
#define	EIDRM		82		/* Identifier removed */
125
#define	ENOMSG		83		/* No message of desired type */
126
#define	EOVERFLOW	84		/* Value too large to be stored in data type */
127
#define	ECANCELED	85		/* Operation canceled */
128
#define	EILSEQ		86		/* Illegal byte sequence */
129
#define	ENOATTR		87		/* Attribute not found */
130
 
131
#define	EDOOFUS		88		/* Programming error */
132
#endif /* _POSIX_SOURCE */
133
 
134
#define	EBADMSG		89		/* Bad message */
135
#define	EMULTIHOP	90		/* Multihop attempted */
136
#define	ENOLINK		91		/* Link has been severed */
137
#define	EPROTO		92		/* Protocol error */
138
 
139
#ifndef _POSIX_SOURCE
140
#define	ENOTCAPABLE	93		/* Capabilities insufficient */
141
#define	ECAPMODE	94		/* Not permitted in capability mode */
142
#define	ENOTRECOVERABLE	95		/* State not recoverable */
143
#define	EOWNERDEAD	96		/* Previous owner died */
144
#endif /* _POSIX_SOURCE */
145
 
146
#ifndef _POSIX_SOURCE
147
#define	ELAST		96		/* Must be equal largest errno */
148
#endif /* _POSIX_SOURCE */
149
 
150
#if defined(_KERNEL) || defined(_WANT_KERNEL_ERRNO)
151
/* pseudo-errors returned inside kernel to modify return to process */
152
#define	ERESTART	(-1)		/* restart syscall */
153
#define	EJUSTRETURN	(-2)		/* don't modify regs, just return */
154
#define	ENOIOCTL	(-3)		/* ioctl not handled by this layer */
155
#define	EDIRIOCTL	(-4)		/* do direct ioctl in GEOM */
156
#define	ERELOOKUP	(-5)		/* retry the directory lookup */
71 7u83 157
#endif
158
 
74 7u83 159
int *	__error(void);
160
#define	errno		(* __error())
72 7u83 161
 
162
#endif
163