aboutsummaryrefslogtreecommitdiff
path: root/cddl/lib/libdtrace/errno.d
blob: 373657b5beb466edf78af29884615deba36d65eb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License, Version 1.0 only
 * (the "License").  You may not use this file except in compliance
 * with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 *
 * Portions Copyright 2006-2008 John Birrell jb@freebsd.org
 * Portions Copyright 2018 Devin Teske dteske@freebsd.org
 *
 * $FreeBSD$
 */
/*
 * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 */

inline int EPERM = 1;
#pragma D binding "1.0" EPERM
inline int ENOENT = 2;
#pragma D binding "1.0" ENOENT
inline int ESRCH = 3;
#pragma D binding "1.0" ESRCH
inline int EINTR = 4;
#pragma D binding "1.0" EINTR
inline int EIO = 5;
#pragma D binding "1.0" EIO
inline int ENXIO = 6;
#pragma D binding "1.0" ENXIO
inline int E2BIG = 7;
#pragma D binding "1.0" E2BIG
inline int ENOEXEC = 8;
#pragma D binding "1.0" ENOEXEC
inline int EBADF = 9;
#pragma D binding "1.0" EBADF
inline int ECHILD = 10;
#pragma D binding "1.0" ECHILD
inline int EDEADLK = 11;
#pragma D binding "1.0" EDEADLK
inline int ENOMEM = 12;
#pragma D binding "1.0" ENOMEM
inline int EACCES = 13;
#pragma D binding "1.0" EACCES
inline int EFAULT = 14;
#pragma D binding "1.0" EFAULT
inline int ENOTBLK = 15;
#pragma D binding "1.0" ENOTBLK
inline int EBUSY = 16;
#pragma D binding "1.0" EBUSY
inline int EEXIST = 17;
#pragma D binding "1.0" EEXIST
inline int EXDEV = 18;
#pragma D binding "1.0" EXDEV
inline int ENODEV = 19;
#pragma D binding "1.0" ENODEV
inline int ENOTDIR = 20;
#pragma D binding "1.0" ENOTDIR
inline int EISDIR = 21;
#pragma D binding "1.0" EISDIR
inline int EINVAL = 22;
#pragma D binding "1.0" EINVAL
inline int ENFILE = 23;
#pragma D binding "1.0" ENFILE
inline int EMFILE = 24;
#pragma D binding "1.0" EMFILE
inline int ENOTTY = 25;
#pragma D binding "1.0" ENOTTY
inline int ETXTBSY = 26;
#pragma D binding "1.0" ETXTBSY
inline int EFBIG = 27;
#pragma D binding "1.0" EFBIG
inline int ENOSPC = 28;
#pragma D binding "1.0" ENOSPC
inline int ESPIPE = 29;
#pragma D binding "1.0" ESPIPE
inline int EROFS = 30;
#pragma D binding "1.0" EROFS
inline int EMLINK = 31;
#pragma D binding "1.0" EMLINK
inline int EPIPE = 32;
#pragma D binding "1.0" EPIPE
inline int EDOM = 33;
#pragma D binding "1.0" EDOM
inline int ERANGE = 34;
#pragma D binding "1.0" ERANGE
inline int EAGAIN = 35;
#pragma D binding "1.0" EAGAIN
inline int EWOULDBLOCK = EAGAIN;
#pragma D binding "1.0" EWOULDBLOCK
inline int EINPROGRESS = 36;
#pragma D binding "1.0" EINPROGRESS
inline int EALREADY = 37;
#pragma D binding "1.0" EALREADY
inline int ENOTSOCK = 38;
#pragma D binding "1.0" ENOTSOCK
inline int EDESTADDRREQ = 39;
#pragma D binding "1.0" EDESTADDRREQ
inline int EMSGSIZE = 40;
#pragma D binding "1.0" EMSGSIZE
inline int EPROTOTYPE = 41;
#pragma D binding "1.0" EPROTOTYPE
inline int ENOPROTOOPT = 42;
#pragma D binding "1.0" ENOPROTOOPT
inline int EPROTONOSUPPORT = 43;
#pragma D binding "1.0" EPROTONOSUPPORT
inline int ESOCKTNOSUPPORT = 44;
#pragma D binding "1.0" ESOCKTNOSUPPORT
inline int EOPNOTSUPP = 45;
#pragma D binding "1.0" EOPNOTSUPP
inline int ENOTSUP = EOPNOTSUPP;
#pragma D binding "1.0" ENOTSUP
inline int EPFNOSUPPORT = 46;
#pragma D binding "1.0" EPFNOSUPPORT
inline int EAFNOSUPPORT = 47;
#pragma D binding "1.0" EAFNOSUPPORT
inline int EADDRINUSE = 48;
#pragma D binding "1.0" EADDRINUSE
inline int EADDRNOTAVAIL = 49;
#pragma D binding "1.0" EADDRNOTAVAIL
inline int ENETDOWN = 50;
#pragma D binding "1.0" ENETDOWN
inline int ENETUNREACH = 51;
#pragma D binding "1.0" ENETUNREACH
inline int ENETRESET = 52;
#pragma D binding "1.0" ENETRESET
inline int ECONNABORTED = 53;
#pragma D binding "1.0" ECONNABORTED
inline int ECONNRESET = 54;
#pragma D binding "1.0" ECONNRESET
inline int ENOBUFS = 55;
#pragma D binding "1.0" ENOBUFS
inline int EISCONN = 56;
#pragma D binding "1.0" EISCONN
inline int ENOTCONN = 57;
#pragma D binding "1.0" ENOTCONN
inline int ESHUTDOWN = 58;
#pragma D binding "1.0" ESHUTDOWN
inline int ETOOMANYREFS = 59;
#pragma D binding "1.0" ETOOMANYREFS
inline int ETIMEDOUT = 60;
#pragma D binding "1.0" ETIMEDOUT
inline int ECONNREFUSED = 61;
#pragma D binding "1.0" ECONNREFUSED
inline int ELOOP = 62;
#pragma D binding "1.0" ELOOP
inline int ENAMETOOLONG = 63;
#pragma D binding "1.0" ENAMETOOLONG
inline int EHOSTDOWN = 64;
#pragma D binding "1.0" EHOSTDOWN
inline int EHOSTUNREACH = 65;
#pragma D binding "1.0" EHOSTUNREACH
inline int ENOTEMPTY = 66;
#pragma D binding "1.0" ENOTEMPTY
inline int EPROCLIM = 67;
#pragma D binding "1.0" EPROCLIM
inline int EUSERS = 68;
#pragma D binding "1.0" EUSERS
inline int EDQUOT = 69;
#pragma D binding "1.0" EDQUOT
inline int ESTALE = 70;
#pragma D binding "1.0" ESTALE
inline int EREMOTE = 71;
#pragma D binding "1.0" EREMOTE
inline int EBADRPC = 72;
#pragma D binding "1.0" EBADRPC
inline int ERPCMISMATCH = 73;
#pragma D binding "1.0" ERPCMISMATCH
inline int EPROGUNAVAIL = 74;
#pragma D binding "1.0" EPROGUNAVAIL
inline int EPROGMISMATCH = 75;
#pragma D binding "1.0" EPROGMISMATCH
inline int EPROCUNAVAIL = 76;
#pragma D binding "1.0" EPROCUNAVAIL
inline int ENOLCK = 77;
#pragma D binding "1.0" ENOLCK
inline int ENOSYS = 78;
#pragma D binding "1.0" ENOSYS
inline int EFTYPE = 79;
#pragma D binding "1.0" EFTYPE
inline int EAUTH = 80;
#pragma D binding "1.0" EAUTH
inline int ENEEDAUTH = 81;
#pragma D binding "1.0" ENEEDAUTH
inline int EIDRM = 82;
#pragma D binding "1.0" EIDRM
inline int ENOMSG = 83;
#pragma D binding "1.0" ENOMSG
inline int EOVERFLOW = 84;
#pragma D binding "1.0" EOVERFLOW
inline int ECANCELED = 85;
#pragma D binding "1.0" ECANCELED
inline int EILSEQ = 86;
#pragma D binding "1.0" EILSEQ
inline int ENOATTR = 87;
#pragma D binding "1.0" ENOATTR
inline int EDOOFUS = 88;
#pragma D binding "1.0" EDOOFUS
inline int EBADMSG = 89;
#pragma D binding "1.0" EBADMSG
inline int EMULTIHOP = 90;
#pragma D binding "1.0" EMULTIHOP
inline int ENOLINK = 91;
#pragma D binding "1.0" ENOLINK
inline int EPROTO = 92;
#pragma D binding "1.0" EPROTO
inline int ENOTCAPABLE = 93;
#pragma D binding "1.13" ENOTCAPABLE
inline int ECAPMODE = 94;
#pragma D binding "1.13" ECAPMODE
inline int ENOTRECOVERABLE = 95;
#pragma D binding "1.13" ENOTRECOVERABLE
inline int EOWNERDEAD = 96;
#pragma D binding "1.13" EOWNERDEAD
inline int ELAST = 96;
#pragma D binding "1.0" ELAST
inline int ERESTART = -1;
#pragma D binding "1.0" ERESTART
inline int EJUSTRETURN = -2;
#pragma D binding "1.0" EJUSTRETURN
inline int ENOIOCTL = -3;
#pragma D binding "1.0" ENOIOCTL
inline int EDIRIOCTL = -4;
#pragma D binding "1.0" EDIRIOCTL
inline int ERELOOKUP = -5;
#pragma D binding "1.13" ERELOOKUP

/*
 * Error strings from <sys/errno.h>
 */
#pragma D binding "1.13" strerror
inline string strerror[int errno] =
	errno == 0 ? 			"Success" :
	errno == EPERM ?		"Operation not permitted" :
	errno == ENOENT ?		"No such file or directory" :
	errno == ESRCH ?		"No such process" :
	errno == EINTR ?		"Interrupted system call" :
	errno == EIO ?			"Input/output error" :
	errno == ENXIO ?		"Device not configured" :
	errno == E2BIG ?		"Argument list too long" :
	errno == ENOEXEC ?		"Exec format error" :
	errno == EBADF ?		"Bad file descriptor" :
	errno == ECHILD ?		"No child processes" :
	errno == EDEADLK ?		"Resource deadlock avoided" :
	errno == ENOMEM ?		"Cannot allocate memory" :
	errno == EACCES ?		"Permission denied" :
	errno == EFAULT ?		"Bad address" :
	errno == ENOTBLK ?		"Block device required" :
	errno == EBUSY ?		"Device busy" :
	errno == EEXIST ?		"File exists" :
	errno == EXDEV ?		"Cross-device link" :
	errno == ENODEV ?		"Operation not supported by device" :
	errno == ENOTDIR ?		"Not a directory" :
	errno == EISDIR ?		"Is a directory" :
	errno == EINVAL ?		"Invalid argument" :
	errno == ENFILE ?		"Too many open files in system" :
	errno == EMFILE ?		"Too many open files" :
	errno == ENOTTY ?		"Inappropriate ioctl for device" :
	errno == ETXTBSY ?		"Text file busy" :
	errno == EFBIG ?		"File too large" :
	errno == ENOSPC ?		"No space left on device" :
	errno == ESPIPE ?		"Illegal seek" :
	errno == EROFS ?		"Read-only filesystem" :
	errno == EMLINK ?		"Too many links" :
	errno == EPIPE ?		"Broken pipe" :
	errno == EDOM ?			"Numerical argument out of domain" :
	errno == ERANGE ?		"Result too large" :
	errno == EAGAIN ?		"Resource temporarily unavailable" :
	errno == EINPROGRESS ?		"Operation now in progress" :
	errno == EALREADY ?		"Operation already in progress" :
	errno == ENOTSOCK ?		"Socket operation on non-socket" :
	errno == EDESTADDRREQ ?		"Destination address required" :
	errno == EMSGSIZE ?		"Message too long" :
	errno == EPROTOTYPE ?		"Protocol wrong type for socket" :
	errno == ENOPROTOOPT ?		"Protocol not available" :
	errno == EPROTONOSUPPORT ?	"Protocol not supported" :
	errno == ESOCKTNOSUPPORT ?	"Socket type not supported" :
	errno == EOPNOTSUPP ?		"Operation not supported" :
	errno == EPFNOSUPPORT ?		"Protocol family not supported" :
	errno == EAFNOSUPPORT ?		"Address family not supported by protocol family" :
	errno == EADDRINUSE ?		"Address already in use" :
	errno == EADDRNOTAVAIL ?	"Can't assign requested address" :
	errno == ENETDOWN ?		"Network is down" :
	errno == ENETUNREACH ?		"Network is unreachable" :
	errno == ENETRESET ?		"Network dropped connection on reset" :
	errno == ECONNABORTED ?		"Software caused connection abort" :
	errno == ECONNRESET ?		"Connection reset by peer" :
	errno == ENOBUFS ?		"No buffer space available" :
	errno == EISCONN ?		"Socket is already connected" :
	errno == ENOTCONN ?		"Socket is not connected" :
	errno == ESHUTDOWN ?		"Can't send after socket shutdown" :
	errno == ETOOMANYREFS ?		"Too many references: can't splice" :
	errno == ETIMEDOUT ?		"Operation timed out" :
	errno == ECONNREFUSED ?		"Connection refused" :
	errno == ELOOP ?		"Too many levels of symbolic links" :
	errno == ENAMETOOLONG ?		"File name too long" :
	errno == EHOSTDOWN ?		"Host is down" :
	errno == EHOSTUNREACH ?		"No route to host" :
	errno == ENOTEMPTY ?		"Directory not empty" :
	errno == EPROCLIM ?		"Too many processes" :
	errno == EUSERS ?		"Too many users" :
	errno == EDQUOT ?		"Disc quota exceeded" :
	errno == ESTALE ?		"Stale NFS file handle" :
	errno == EREMOTE ?		"Too many levels of remote in path" :
	errno == EBADRPC ?		"RPC struct is bad" :
	errno == ERPCMISMATCH ?		"RPC version wrong" :
	errno == EPROGUNAVAIL ?		"RPC prog. not avail" :
	errno == EPROGMISMATCH ?	"Program version wrong" :
	errno == EPROCUNAVAIL ?		"Bad procedure for program" :
	errno == ENOLCK ?		"No locks available" :
	errno == ENOSYS ?		"Function not implemented" :
	errno == EFTYPE ?		"Inappropriate file type or format" :
	errno == EAUTH ?		"Authentication error" :
	errno == ENEEDAUTH ?		"Need authenticator" :
	errno == EIDRM ?		"Identifier removed" :
	errno == ENOMSG ?		"No message of desired type" :
	errno == EOVERFLOW ?		"Value too large to be stored in data type" :
	errno == ECANCELED ?		"Operation canceled" :
	errno == EILSEQ ?		"Illegal byte sequence" :
	errno == ENOATTR ?		"Attribute not found" :
	errno == EDOOFUS ?		"Programming error" :
	errno == EBADMSG ?		"Bad message" :
	errno == EMULTIHOP ?		"Multihop attempted" :
	errno == ENOLINK ?		"Link has been severed" :
	errno == EPROTO ?		"Protocol error" :
	errno == ENOTCAPABLE ?		"Capabilities insufficient" :
	errno == ECAPMODE ?		"Not permitted in capability mode" :
	errno == ENOTRECOVERABLE ?	"State not recoverable" :
	errno == EOWNERDEAD ?		"Previous owner died" :
	errno == ERESTART ?		"restart syscall" :
	errno == EJUSTRETURN ?		"don't modify regs, just return" :
	errno == ENOIOCTL ?		"ioctl not handled by this layer" :
	errno == EDIRIOCTL ?		"do direct ioctl in GEOM" :
	errno == ERELOOKUP ?		"retry the directory lookup" :
	"Unknown error";