|
@@ -1,3 +1,21 @@
|
|
1
|
+/*
|
|
2
|
+ * Copyright (C) 2010 Michael Brown <mbrown@fensystems.co.uk>.
|
|
3
|
+ *
|
|
4
|
+ * This program is free software; you can redistribute it and/or
|
|
5
|
+ * modify it under the terms of the GNU General Public License as
|
|
6
|
+ * published by the Free Software Foundation; either version 2 of the
|
|
7
|
+ * License, or any later version.
|
|
8
|
+ *
|
|
9
|
+ * This program is distributed in the hope that it will be useful, but
|
|
10
|
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
12
|
+ * General Public License for more details.
|
|
13
|
+ *
|
|
14
|
+ * You should have received a copy of the GNU General Public License
|
|
15
|
+ * along with this program; if not, write to the Free Software
|
|
16
|
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
17
|
+ */
|
|
18
|
+
|
1
|
19
|
#ifndef ERRNO_H
|
2
|
20
|
#define ERRNO_H
|
3
|
21
|
|
|
@@ -40,19 +58,13 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
40
|
58
|
*
|
41
|
59
|
*
|
42
|
60
|
* The convention within the code is that errors are negative and
|
43
|
|
- * expressed using the POSIX error code and (optionally) a per-file
|
44
|
|
- * disambiguator, e.g.
|
|
61
|
+ * expressed using the POSIX error, e.g.
|
45
|
62
|
*
|
46
|
63
|
* return -EINVAL;
|
47
|
64
|
*
|
48
|
|
- * or
|
49
|
|
- *
|
50
|
|
- * #define ETCP_BAD_CHECKSUM EUNIQ_02
|
51
|
|
- * return -( EINVAL | ETCP_BAD_CHECKSUM )
|
52
|
|
- *
|
53
|
65
|
* By various bits of preprocessor magic, the PXE error code and file
|
54
|
66
|
* identifier are already incorporated into the definition of the
|
55
|
|
- * POSIX error code, which keeps the code relatively clean.
|
|
67
|
+ * POSIX error macro, which keeps the code relatively clean.
|
56
|
68
|
*
|
57
|
69
|
*
|
58
|
70
|
* Functions that wish to return failures should be declared as
|
|
@@ -69,6 +81,21 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
69
|
81
|
* As illustrated in the above example, error returns should generally
|
70
|
82
|
* be directly propagated upward to the calling function.
|
71
|
83
|
*
|
|
84
|
+ *
|
|
85
|
+ * Individual files may declare localised errors using
|
|
86
|
+ * __einfo_uniqify(). For example, iscsi.c declares a localised
|
|
87
|
+ * version of EACCES for the error of "access denied due to incorrect
|
|
88
|
+ * target username":
|
|
89
|
+ *
|
|
90
|
+ * #define EACCES_INCORRECT_TARGET_USERNAME \
|
|
91
|
+ * __einfo_error ( EINFO_EACCES_INCORRECT_TARGET_USERNAME )
|
|
92
|
+ * #define EINFO_EACCES_INCORRECT_TARGET_USERNAME \
|
|
93
|
+ * __einfo_uniqify ( EINFO_EACCESS, 0x01, "Incorrect target username" )
|
|
94
|
+ *
|
|
95
|
+ * which can then be used as:
|
|
96
|
+ *
|
|
97
|
+ * return -EACCES_INCORRECT_TARGET_USERNAME;
|
|
98
|
+ *
|
72
|
99
|
*/
|
73
|
100
|
|
74
|
101
|
/* Get definitions for file identifiers */
|
|
@@ -85,8 +112,121 @@ extern char missing_errfile_declaration[] __attribute__ (( deprecated ));
|
85
|
112
|
#define ERRFILE ( 0 * ( ( int ) missing_errfile_declaration ) )
|
86
|
113
|
#endif
|
87
|
114
|
|
88
|
|
-/** Derive PXENV_STATUS code from iPXE error number */
|
89
|
|
-#define PXENV_STATUS( rc ) ( (-(rc)) & 0x00ff )
|
|
115
|
+/**
|
|
116
|
+ * Declare error information
|
|
117
|
+ *
|
|
118
|
+ * @v pxe PXE error number (0x00-0xff)
|
|
119
|
+ * @v posix POSIX error number (0x00-0x7f)
|
|
120
|
+ * @v uniq Error disambiguator (0x00-0x1f)
|
|
121
|
+ * @v desc Error description
|
|
122
|
+ * @ret einfo Error information
|
|
123
|
+ */
|
|
124
|
+#define __einfo( pxe, posix, uniq, desc ) ( pxe, posix, uniq, desc )
|
|
125
|
+
|
|
126
|
+/**
|
|
127
|
+ * Get PXE error number
|
|
128
|
+ *
|
|
129
|
+ * @v einfo Error information
|
|
130
|
+ * @ret pxe PXE error number
|
|
131
|
+ */
|
|
132
|
+#define __einfo_pxe( einfo ) __einfo_extract_pxe einfo
|
|
133
|
+#define __einfo_extract_pxe( pxe, posix, uniq, desc ) pxe
|
|
134
|
+
|
|
135
|
+/**
|
|
136
|
+ * Get POSIX error number
|
|
137
|
+ *
|
|
138
|
+ * @v einfo Error information
|
|
139
|
+ * @ret posix POSIX error number
|
|
140
|
+ */
|
|
141
|
+#define __einfo_posix( einfo ) __einfo_extract_posix einfo
|
|
142
|
+#define __einfo_extract_posix( pxe, posix, uniq, desc ) posix
|
|
143
|
+
|
|
144
|
+/**
|
|
145
|
+ * Get error disambiguator
|
|
146
|
+ *
|
|
147
|
+ * @v einfo Error information
|
|
148
|
+ * @ret uniq Error disambiguator
|
|
149
|
+ */
|
|
150
|
+#define __einfo_uniq( einfo ) __einfo_extract_uniq einfo
|
|
151
|
+#define __einfo_extract_uniq( pxe, posix, uniq, desc ) uniq
|
|
152
|
+
|
|
153
|
+/**
|
|
154
|
+ * Get error description
|
|
155
|
+ *
|
|
156
|
+ * @v einfo Error information
|
|
157
|
+ * @ret desc Error description
|
|
158
|
+ */
|
|
159
|
+#define __einfo_desc( einfo ) __einfo_extract_desc einfo
|
|
160
|
+#define __einfo_extract_desc( pxe, posix, uniq, desc ) desc
|
|
161
|
+
|
|
162
|
+/**
|
|
163
|
+ * Declare disambiguated error
|
|
164
|
+ *
|
|
165
|
+ * @v einfo_base Base error information
|
|
166
|
+ * @v uniq Error disambiguator
|
|
167
|
+ * @v desc Error description
|
|
168
|
+ * @ret einfo Error information
|
|
169
|
+ */
|
|
170
|
+#define __einfo_uniqify( einfo_base, uniq, desc ) \
|
|
171
|
+ __einfo ( __einfo_pxe ( einfo_base ), \
|
|
172
|
+ __einfo_posix ( einfo_base ), \
|
|
173
|
+ uniq, desc )
|
|
174
|
+
|
|
175
|
+/**
|
|
176
|
+ * Get error number
|
|
177
|
+ *
|
|
178
|
+ * @v einfo Error information
|
|
179
|
+ * @ret errno Error number
|
|
180
|
+ */
|
|
181
|
+#define __einfo_errno( einfo ) \
|
|
182
|
+ ( ( __einfo_posix ( einfo ) << 24 ) | ( ERRFILE ) | \
|
|
183
|
+ ( __einfo_uniq ( einfo ) << 8 ) | \
|
|
184
|
+ ( __einfo_pxe ( einfo ) << 0 ) )
|
|
185
|
+
|
|
186
|
+/**
|
|
187
|
+ * Disambiguate a base error based on non-constant information
|
|
188
|
+ *
|
|
189
|
+ * @v error_base Base error
|
|
190
|
+ * @v uniq Error disambiguator
|
|
191
|
+ * @v ... List of expected possible disambiguated errors
|
|
192
|
+ * @ret error Error
|
|
193
|
+ *
|
|
194
|
+ * EUNIQ() should be used when information from an external source is
|
|
195
|
+ * being incorporated into an error. For example, the 802.11 stack
|
|
196
|
+ * uses EUNIQ() to incorporate 802.11 status codes returned by an
|
|
197
|
+ * access point into an error.
|
|
198
|
+ *
|
|
199
|
+ * EUNIQ() should not be used for constant error disambiguators; use
|
|
200
|
+ * __einfo_uniqify() instead.
|
|
201
|
+ */
|
|
202
|
+#define EUNIQ( errno, uniq, ... ) ( { \
|
|
203
|
+ euniq_discard ( 0, ##__VA_ARGS__); \
|
|
204
|
+ ( (errno) | ( (uniq) << 8 ) ); } )
|
|
205
|
+static inline void euniq_discard ( int dummy __unused, ... ) {}
|
|
206
|
+
|
|
207
|
+/**
|
|
208
|
+ * Declare error
|
|
209
|
+ *
|
|
210
|
+ * @v einfo Error information
|
|
211
|
+ * @ret error Error
|
|
212
|
+ */
|
|
213
|
+#define __einfo_error( einfo ) ( { \
|
|
214
|
+ __asm__ ( ".section \".einfo\", \"\", @progbits\n\t" \
|
|
215
|
+ ".align 8\n\t" \
|
|
216
|
+ "\n1:\n\t" \
|
|
217
|
+ ".long ( 4f - 1b )\n\t" \
|
|
218
|
+ ".long %c0\n\t" \
|
|
219
|
+ ".long ( 2f - 1b )\n\t" \
|
|
220
|
+ ".long ( 3f - 1b )\n\t" \
|
|
221
|
+ ".long %c1\n\t" \
|
|
222
|
+ "\n2:\t.asciz \"" __einfo_desc ( einfo ) "\"\n\t" \
|
|
223
|
+ "\n3:\t.asciz \"" __FILE__ "\"\n\t" \
|
|
224
|
+ ".align 8\n\t" \
|
|
225
|
+ "\n4:\n\t" \
|
|
226
|
+ ".previous\n\t" : : \
|
|
227
|
+ "i" ( __einfo_errno ( einfo) ), \
|
|
228
|
+ "i" ( __LINE__ ) ); \
|
|
229
|
+ __einfo_errno ( einfo ); } )
|
90
|
230
|
|
91
|
231
|
/**
|
92
|
232
|
* @defgroup pxeerrors PXE error codes
|
|
@@ -199,309 +339,420 @@ extern char missing_errfile_declaration[] __attribute__ (( deprecated ));
|
199
|
339
|
|
200
|
340
|
/** @} */
|
201
|
341
|
|
|
342
|
+/** Derive PXENV_STATUS code from iPXE error number */
|
|
343
|
+#define PXENV_STATUS( rc ) ( (-(rc)) & 0x00ff )
|
|
344
|
+
|
202
|
345
|
/**
|
203
|
346
|
* @defgroup posixerrors POSIX error codes
|
204
|
347
|
*
|
205
|
348
|
* The names and meanings (but not the values) of these error codes
|
206
|
|
- * are defined by POSIX. We choose to assign unique values which
|
207
|
|
- * incorporate the closest equivalent PXE error code, so that code may
|
208
|
|
- * simply use ENOMEM, rather than having to use the cumbersome
|
209
|
|
- * (ENOMEM|PXENV_STATUS_OUT_OF_RESOURCES).
|
|
349
|
+ * are defined by POSIX.
|
210
|
350
|
*
|
211
|
351
|
* @{
|
212
|
352
|
*/
|
213
|
353
|
|
214
|
354
|
/** Operation completed successfully */
|
215
|
|
-#define ENOERR ( ERRFILE | PXENV_STATUS_SUCCESS | 0x00000000 )
|
|
355
|
+#define ENOERR __einfo_error ( EINFO_ENOERR )
|
|
356
|
+#define EINFO_ENOERR __einfo ( PXENV_STATUS_SUCCESS, 0x00, 0, \
|
|
357
|
+ "Operation completed successfully" )
|
216
|
358
|
|
217
|
|
-/** Arg list too long */
|
218
|
|
-#define E2BIG ( ERRFILE | PXENV_STATUS_BAD_FUNC | 0x01000000 )
|
|
359
|
+/** Argument list too long */
|
|
360
|
+#define E2BIG __einfo_error ( EINFO_E2BIG )
|
|
361
|
+#define EINFO_E2BIG __einfo ( PXENV_STATUS_BAD_FUNC, 0x01, 0, \
|
|
362
|
+ "Argument list too long" )
|
219
|
363
|
|
220
|
364
|
/** Permission denied */
|
221
|
|
-#define EACCES ( ERRFILE | PXENV_STATUS_TFTP_ACCESS_VIOLATION | 0x02000000 )
|
|
365
|
+#define EACCES __einfo_error ( EINFO_EACCES )
|
|
366
|
+#define EINFO_EACCES __einfo ( PXENV_STATUS_TFTP_ACCESS_VIOLATION, 0x02, 0, \
|
|
367
|
+ "Permission denied" )
|
222
|
368
|
|
223
|
|
-/** Address in use */
|
224
|
|
-#define EADDRINUSE ( ERRFILE | PXENV_STATUS_UDP_OPEN | 0x03000000 )
|
|
369
|
+/** Address already in use */
|
|
370
|
+#define EADDRINUSE __einfo_error ( EINFO_EADDRINUSE )
|
|
371
|
+#define EINFO_EADDRINUSE __einfo ( PXENV_STATUS_UDP_OPEN, 0x03, 0, \
|
|
372
|
+ "Address already in use" )
|
225
|
373
|
|
226
|
374
|
/** Address not available */
|
227
|
|
-#define EADDRNOTAVAIL ( ERRFILE | PXENV_STATUS_UDP_OPEN | 0x04000000 )
|
|
375
|
+#define EADDRNOTAVAIL __einfo_error ( EINFO_EADDRNOTAVAIL )
|
|
376
|
+#define EINFO_EADDRNOTAVAIL __einfo ( PXENV_STATUS_UDP_OPEN, 0x04, 0, \
|
|
377
|
+ "Address not available" )
|
228
|
378
|
|
229
|
379
|
/** Address family not supported */
|
230
|
|
-#define EAFNOSUPPORT ( ERRFILE | PXENV_STATUS_UNSUPPORTED | 0x05000000 )
|
|
380
|
+#define EAFNOSUPPORT __einfo_error ( EINFO_EAFNOSUPPORT )
|
|
381
|
+#define EINFO_EAFNOSUPPORT __einfo ( PXENV_STATUS_UNSUPPORTED, 0x05, 0, \
|
|
382
|
+ "Address family not supported" )
|
231
|
383
|
|
232
|
384
|
/** Resource temporarily unavailable */
|
233
|
|
-#define EAGAIN ( ERRFILE | PXENV_STATUS_FAILURE | 0x06000000 )
|
|
385
|
+#define EAGAIN __einfo_error ( EINFO_EAGAIN )
|
|
386
|
+#define EINFO_EAGAIN __einfo ( PXENV_STATUS_FAILURE, 0x06, 0, \
|
|
387
|
+ "Resource temporarily unavailable" )
|
234
|
388
|
|
235
|
389
|
/** Connection already in progress */
|
236
|
|
-#define EALREADY ( ERRFILE | PXENV_STATUS_UDP_OPEN | 0x07000000 )
|
|
390
|
+#define EALREADY __einfo_error ( EINFO_EALREADY )
|
|
391
|
+#define EINFO_EALREADY __einfo ( PXENV_STATUS_UDP_OPEN, 0x07, 0, \
|
|
392
|
+ "Connection already in progress" )
|
237
|
393
|
|
238
|
394
|
/** Bad file descriptor */
|
239
|
|
-#define EBADF ( ERRFILE | PXENV_STATUS_TFTP_CLOSED | 0x08000000 )
|
|
395
|
+#define EBADF __einfo_error ( EINFO_EBADF )
|
|
396
|
+#define EINFO_EBADF __einfo ( PXENV_STATUS_TFTP_CLOSED, 0x08, 0, \
|
|
397
|
+ "Bad file descriptor" )
|
240
|
398
|
|
241
|
399
|
/** Bad message */
|
242
|
|
-#define EBADMSG ( ERRFILE | PXENV_STATUS_FAILURE | 0x09000000 )
|
|
400
|
+#define EBADMSG __einfo_error ( EINFO_EBADMSG )
|
|
401
|
+#define EINFO_EBADMSG __einfo ( PXENV_STATUS_FAILURE, 0x09, 0, \
|
|
402
|
+ "Bad message" )
|
243
|
403
|
|
244
|
|
-/** Resource busy */
|
245
|
|
-#define EBUSY ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x0a000000 )
|
|
404
|
+/** Device or resource busy */
|
|
405
|
+#define EBUSY __einfo_error ( EINFO_EBUSY )
|
|
406
|
+#define EINFO_EBUSY __einfo ( PXENV_STATUS_OUT_OF_RESOURCES, 0x0a, 0, \
|
|
407
|
+ "Device or resource busy" )
|
246
|
408
|
|
247
|
409
|
/** Operation canceled */
|
248
|
|
-#define ECANCELED \
|
249
|
|
- ( ERRFILE | PXENV_STATUS_BINL_CANCELED_BY_KEYSTROKE | 0x0b000000 )
|
|
410
|
+#define ECANCELED __einfo_error ( EINFO_ECANCELED )
|
|
411
|
+#define EINFO_ECANCELED __einfo ( PXENV_STATUS_BINL_CANCELED_BY_KEYSTROKE, \
|
|
412
|
+ 0x0b, 0, "Operation canceled" )
|
250
|
413
|
|
251
|
414
|
/** No child processes */
|
252
|
|
-#define ECHILD ( ERRFILE | PXENV_STATUS_TFTP_FILE_NOT_FOUND | 0x0c000000 )
|
|
415
|
+#define ECHILD __einfo_error ( EINFO_ECHILD )
|
|
416
|
+#define EINFO_ECHILD __einfo ( PXENV_STATUS_TFTP_FILE_NOT_FOUND, 0x0c, 0, \
|
|
417
|
+ "No child processes" )
|
253
|
418
|
|
254
|
419
|
/** Connection aborted */
|
255
|
|
-#define ECONNABORTED \
|
256
|
|
- ( ERRFILE | PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION | 0x0d000000 )
|
|
420
|
+#define ECONNABORTED __einfo_error ( EINFO_ECONNABORTED )
|
|
421
|
+#define EINFO_ECONNABORTED \
|
|
422
|
+ __einfo ( PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION, 0x0d, 0, \
|
|
423
|
+ "Connection aborted" )
|
257
|
424
|
|
258
|
425
|
/** Connection refused */
|
259
|
|
-#define ECONNREFUSED \
|
260
|
|
- ( ERRFILE | PXENV_STATUS_TFTP_CANNOT_OPEN_CONNECTION | 0x0e000000 )
|
|
426
|
+#define ECONNREFUSED __einfo_error ( EINFO_ECONNREFUSED )
|
|
427
|
+#define EINFO_ECONNREFUSED __einfo ( PXENV_STATUS_TFTP_CANNOT_OPEN_CONNECTION, \
|
|
428
|
+ 0x0e, 0, "Connection refused" )
|
261
|
429
|
|
262
|
430
|
/** Connection reset */
|
263
|
|
-#define ECONNRESET \
|
264
|
|
- ( ERRFILE | PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION | 0x0f000000 )
|
|
431
|
+#define ECONNRESET __einfo_error ( EINFO_ECONNRESET )
|
|
432
|
+#define EINFO_ECONNRESET \
|
|
433
|
+ __einfo ( PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION, 0x0f, 0, \
|
|
434
|
+ "Connection reset" )
|
265
|
435
|
|
266
|
436
|
/** Resource deadlock avoided */
|
267
|
|
-#define EDEADLK ( ERRFILE | PXENV_STATUS_FAILURE | 0x10000000 )
|
|
437
|
+#define EDEADLK __einfo_error ( EINFO_EDEADLK )
|
|
438
|
+#define EINFO_EDEADLK __einfo ( PXENV_STATUS_FAILURE, 0x10, 0, \
|
|
439
|
+ "Resource deadlock avoided" )
|
268
|
440
|
|
269
|
441
|
/** Destination address required */
|
270
|
|
-#define EDESTADDRREQ ( ERRFILE | PXENV_STATUS_BAD_FUNC | 0x11000000 )
|
|
442
|
+#define EDESTADDRREQ __einfo_error ( EINFO_EDESTADDRREQ )
|
|
443
|
+#define EINFO_EDESTADDRREQ __einfo ( PXENV_STATUS_BAD_FUNC, 0x11, 0, \
|
|
444
|
+ "Destination address required" )
|
271
|
445
|
|
272
|
|
-/** Domain error */
|
273
|
|
-#define EDOM ( ERRFILE | PXENV_STATUS_FAILURE | 0x12000000 )
|
|
446
|
+/** Mathematics argument out of domain of function */
|
|
447
|
+#define EDOM __einfo_error ( EINFO_EDOM )
|
|
448
|
+#define EINFO_EDOM __einfo ( PXENV_STATUS_FAILURE, 0x12, 0, \
|
|
449
|
+ "Mathematics argument out of domain of function" )
|
274
|
450
|
|
275
|
|
-/** Reserved */
|
276
|
|
-#define EDQUOT ( ERRFILE | PXENV_STATUS_FAILURE | 0x13000000 )
|
|
451
|
+/** Disk quota exceeded */
|
|
452
|
+#define EDQUOT __einfo_error ( EINFO_EDQUOT )
|
|
453
|
+#define EINFO_EDQUOT __einfo ( PXENV_STATUS_FAILURE, 0x13, 0, \
|
|
454
|
+ "Disk quote exceeded" )
|
277
|
455
|
|
278
|
456
|
/** File exists */
|
279
|
|
-#define EEXIST ( ERRFILE | PXENV_STATUS_FAILURE | 0x14000000 )
|
|
457
|
+#define EEXIST __einfo_error ( EINFO_EEXIST )
|
|
458
|
+#define EINFO_EEXIST __einfo ( PXENV_STATUS_FAILURE, 0x14, 0, \
|
|
459
|
+ "File exists" )
|
280
|
460
|
|
281
|
461
|
/** Bad address */
|
282
|
|
-#define EFAULT ( ERRFILE | PXENV_STATUS_MCOPY_PROBLEM | 0x15000000 )
|
|
462
|
+#define EFAULT __einfo_error ( EINFO_EFAULT )
|
|
463
|
+#define EINFO_EFAULT __einfo ( PXENV_STATUS_MCOPY_PROBLEM, 0x15, 0, \
|
|
464
|
+ "Bad address" )
|
283
|
465
|
|
284
|
466
|
/** File too large */
|
285
|
|
-#define EFBIG ( ERRFILE | PXENV_STATUS_MCOPY_PROBLEM | 0x16000000 )
|
|
467
|
+#define EFBIG __einfo_error ( EINFO_EFBIG )
|
|
468
|
+#define EINFO_EFBIG __einfo ( PXENV_STATUS_MCOPY_PROBLEM, 0x16, 0, \
|
|
469
|
+ "File too large" )
|
286
|
470
|
|
287
|
471
|
/** Host is unreachable */
|
288
|
|
-#define EHOSTUNREACH ( ERRFILE | PXENV_STATUS_ARP_TIMEOUT | 0x17000000 )
|
|
472
|
+#define EHOSTUNREACH __einfo_error ( EINFO_EHOSTUNREACH )
|
|
473
|
+#define EINFO_EHOSTUNREACH __einfo ( PXENV_STATUS_ARP_TIMEOUT, 0x17, 0, \
|
|
474
|
+ "Host is unreachable" )
|
289
|
475
|
|
290
|
476
|
/** Identifier removed */
|
291
|
|
-#define EIDRM ( ERRFILE | PXENV_STATUS_FAILURE | 0x18000000 )
|
|
477
|
+#define EIDRM __einfo_error ( EINFO_EIDRM )
|
|
478
|
+#define EINFO_EIDRM __einfo ( PXENV_STATUS_FAILURE, 0x18, 0, \
|
|
479
|
+ "Identifier removed" )
|
292
|
480
|
|
293
|
481
|
/** Illegal byte sequence */
|
294
|
|
-#define EILSEQ ( ERRFILE | PXENV_STATUS_FAILURE | 0x19000000 )
|
|
482
|
+#define EILSEQ __einfo_error ( EINFO_EILSEQ )
|
|
483
|
+#define EINFO_EILSEQ __einfo ( PXENV_STATUS_FAILURE, 0x19, 0, \
|
|
484
|
+ "Illegal byte sequence" )
|
295
|
485
|
|
296
|
486
|
/** Operation in progress */
|
297
|
|
-#define EINPROGRESS ( ERRFILE | PXENV_STATUS_FAILURE | 0x1a000000 )
|
|
487
|
+#define EINPROGRESS __einfo_error ( EINFO_EINPROGRESS )
|
|
488
|
+#define EINFO_EINPROGRESS __einfo ( PXENV_STATUS_FAILURE, 0x1a, 0, \
|
|
489
|
+ "Operation in progress" )
|
298
|
490
|
|
299
|
491
|
/** Interrupted function call */
|
300
|
|
-#define EINTR ( ERRFILE | PXENV_STATUS_FAILURE | 0x1b000000 )
|
|
492
|
+#define EINTR __einfo_error ( EINFO_EINTR )
|
|
493
|
+#define EINFO_EINTR __einfo ( PXENV_STATUS_FAILURE, 0x1b, 0, \
|
|
494
|
+ "Interrupted function call" )
|
301
|
495
|
|
302
|
496
|
/** Invalid argument */
|
303
|
|
-#define EINVAL ( ERRFILE | PXENV_STATUS_BAD_FUNC | 0x1c000000 )
|
|
497
|
+#define EINVAL __einfo_error ( EINFO_EINVAL )
|
|
498
|
+#define EINFO_EINVAL __einfo ( PXENV_STATUS_BAD_FUNC, 0x1c, 0, \
|
|
499
|
+ "Invalid argument" )
|
304
|
500
|
|
305
|
501
|
/** Input/output error */
|
306
|
|
-#define EIO \
|
307
|
|
- ( ERRFILE | PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION | 0x1d000000 )
|
|
502
|
+#define EIO __einfo_error ( EINFO_EIO )
|
|
503
|
+#define EINFO_EIO __einfo ( PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION, \
|
|
504
|
+ 0x1d, 0, "Input/output error" )
|
308
|
505
|
|
309
|
506
|
/** Socket is connected */
|
310
|
|
-#define EISCONN ( ERRFILE | PXENV_STATUS_UDP_OPEN | 0x1e000000 )
|
|
507
|
+#define EISCONN __einfo_error ( EINFO_EISCONN )
|
|
508
|
+#define EINFO_EISCONN __einfo ( PXENV_STATUS_UDP_OPEN, 0x1e, 0, \
|
|
509
|
+ "Socket is connected" )
|
311
|
510
|
|
312
|
511
|
/** Is a directory */
|
313
|
|
-#define EISDIR ( ERRFILE | PXENV_STATUS_FAILURE | 0x1f000000 )
|
|
512
|
+#define EISDIR __einfo_error ( EINFO_EISDIR )
|
|
513
|
+#define EINFO_EISDIR __einfo ( PXENV_STATUS_FAILURE, 0x1f, 0, \
|
|
514
|
+ "Is a directory" )
|
314
|
515
|
|
315
|
516
|
/** Too many levels of symbolic links */
|
316
|
|
-#define ELOOP ( ERRFILE | PXENV_STATUS_FAILURE | 0x20000000 )
|
|
517
|
+#define ELOOP __einfo_error ( EINFO_ELOOP )
|
|
518
|
+#define EINFO_ELOOP __einfo ( PXENV_STATUS_FAILURE, 0x20, 0, \
|
|
519
|
+ "Too many levels of symbolic links" )
|
317
|
520
|
|
318
|
521
|
/** Too many open files */
|
319
|
|
-#define EMFILE ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x21000000 )
|
|
522
|
+#define EMFILE __einfo_error ( EINFO_EMFILE )
|
|
523
|
+#define EINFO_EMFILE __einfo ( PXENV_STATUS_OUT_OF_RESOURCES, 0x21, 0, \
|
|
524
|
+ "Too many open files" )
|
320
|
525
|
|
321
|
526
|
/** Too many links */
|
322
|
|
-#define EMLINK ( ERRFILE | PXENV_STATUS_FAILURE | 0x22000000 )
|
|
527
|
+#define EMLINK __einfo_error ( EINFO_EMLINK )
|
|
528
|
+#define EINFO_EMLINK __einfo ( PXENV_STATUS_FAILURE, 0x22, 0, \
|
|
529
|
+ "Too many links" )
|
323
|
530
|
|
324
|
|
-/** Inappropriate message buffer length */
|
325
|
|
-#define EMSGSIZE ( ERRFILE | PXENV_STATUS_BAD_FUNC | 0x23000000 )
|
|
531
|
+/** Message too long */
|
|
532
|
+#define EMSGSIZE __einfo_error ( EINFO_EMSGSIZE )
|
|
533
|
+#define EINFO_EMSGSIZE __einfo ( PXENV_STATUS_BAD_FUNC, 0x23, 0, \
|
|
534
|
+ "Message too long" )
|
326
|
535
|
|
327
|
|
-/** Reserved */
|
328
|
|
-#define EMULTIHOP ( ERRFILE | PXENV_STATUS_FAILURE | 0x24000000 )
|
|
536
|
+/** Multihop attempted */
|
|
537
|
+#define EMULTIHOP __einfo_error ( EINFO_EMULTIHOP )
|
|
538
|
+#define EINFO_EMULTIHOP __einfo ( PXENV_STATUS_FAILURE, 0x24, 0, \
|
|
539
|
+ "Multihop attempted" )
|
329
|
540
|
|
330
|
541
|
/** Filename too long */
|
331
|
|
-#define ENAMETOOLONG ( ERRFILE | PXENV_STATUS_FAILURE | 0x25000000 )
|
|
542
|
+#define ENAMETOOLONG __einfo_error ( EINFO_ENAMETOOLONG )
|
|
543
|
+#define EINFO_ENAMETOOLONG __einfo ( PXENV_STATUS_FAILURE, 0x25, 0, \
|
|
544
|
+ "Filename too long" )
|
332
|
545
|
|
333
|
546
|
/** Network is down */
|
334
|
|
-#define ENETDOWN ( ERRFILE | PXENV_STATUS_ARP_TIMEOUT | 0x26000000 )
|
|
547
|
+#define ENETDOWN __einfo_error ( EINFO_ENETDOWN )
|
|
548
|
+#define EINFO_ENETDOWN __einfo ( PXENV_STATUS_ARP_TIMEOUT, 0x26, 0, \
|
|
549
|
+ "Network is down" )
|
335
|
550
|
|
336
|
551
|
/** Connection aborted by network */
|
337
|
|
-#define ENETRESET ( ERRFILE | PXENV_STATUS_FAILURE | 0x27000000 )
|
|
552
|
+#define ENETRESET __einfo_error ( EINFO_ENETRESET )
|
|
553
|
+#define EINFO_ENETRESET __einfo ( PXENV_STATUS_FAILURE, 0x27, 0, \
|
|
554
|
+ "Connection aborted by network" )
|
338
|
555
|
|
339
|
556
|
/** Network unreachable */
|
340
|
|
-#define ENETUNREACH ( ERRFILE | PXENV_STATUS_ARP_TIMEOUT | 0x28000000 )
|
|
557
|
+#define ENETUNREACH __einfo_error ( EINFO_ENETUNREACH )
|
|
558
|
+#define EINFO_ENETUNREACH __einfo ( PXENV_STATUS_ARP_TIMEOUT, 0x28, 0, \
|
|
559
|
+ "Network unreachable" )
|
341
|
560
|
|
342
|
561
|
/** Too many open files in system */
|
343
|
|
-#define ENFILE ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x29000000 )
|
|
562
|
+#define ENFILE __einfo_error ( EINFO_ENFILE )
|
|
563
|
+#define EINFO_ENFILE __einfo ( PXENV_STATUS_OUT_OF_RESOURCES, 0x29, 0, \
|
|
564
|
+ "Too many open files in system" )
|
344
|
565
|
|
345
|
566
|
/** No buffer space available */
|
346
|
|
-#define ENOBUFS ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x2a000000 )
|
|
567
|
+#define ENOBUFS __einfo_error ( EINFO_ENOBUFS )
|
|
568
|
+#define EINFO_ENOBUFS __einfo ( PXENV_STATUS_OUT_OF_RESOURCES, 0x2a, 0, \
|
|
569
|
+ "No buffer space available" )
|
347
|
570
|
|
348
|
571
|
/** No message is available on the STREAM head read queue */
|
349
|
|
-#define ENODATA ( ERRFILE | PXENV_STATUS_FAILURE | 0x2b000000 )
|
|
572
|
+#define ENODATA __einfo_error ( EINFO_ENODATA )
|
|
573
|
+#define EINFO_ENODATA \
|
|
574
|
+ __einfo ( PXENV_STATUS_FAILURE, 0x2b, 0, \
|
|
575
|
+ "No message is available on the STREAM head read queue" )
|
350
|
576
|
|
351
|
577
|
/** No such device */
|
352
|
|
-#define ENODEV ( ERRFILE | PXENV_STATUS_TFTP_FILE_NOT_FOUND | 0x2c000000 )
|
|
578
|
+#define ENODEV __einfo_error ( EINFO_ENODEV )
|
|
579
|
+#define EINFO_ENODEV __einfo ( PXENV_STATUS_TFTP_FILE_NOT_FOUND, 0x2c, 0, \
|
|
580
|
+ "No such device" )
|
353
|
581
|
|
354
|
582
|
/** No such file or directory */
|
355
|
|
-#define ENOENT ( ERRFILE | PXENV_STATUS_TFTP_FILE_NOT_FOUND | 0x2d000000 )
|
|
583
|
+#define ENOENT __einfo_error ( EINFO_ENOENT )
|
|
584
|
+#define EINFO_ENOENT __einfo ( PXENV_STATUS_TFTP_FILE_NOT_FOUND, 0x2d, 0, \
|
|
585
|
+ "No such file or directory" )
|
356
|
586
|
|
357
|
587
|
/** Exec format error */
|
358
|
|
-#define ENOEXEC ( ERRFILE | PXENV_STATUS_FAILURE | 0x2e000000 )
|
|
588
|
+#define ENOEXEC __einfo_error ( EINFO_ENOEXEC )
|
|
589
|
+#define EINFO_ENOEXEC __einfo ( PXENV_STATUS_FAILURE, 0x2e, 0, \
|
|
590
|
+ "Exec format error" )
|
359
|
591
|
|
360
|
592
|
/** No locks available */
|
361
|
|
-#define ENOLCK ( ERRFILE | PXENV_STATUS_FAILURE | 0x2f000000 )
|
|
593
|
+#define ENOLCK __einfo_error ( EINFO_ENOLCK )
|
|
594
|
+#define EINFO_ENOLCK __einfo ( PXENV_STATUS_FAILURE, 0x2f, 0, \
|
|
595
|
+ "No locks available" )
|
362
|
596
|
|
363
|
|
-/** Reserved */
|
364
|
|
-#define ENOLINK ( ERRFILE | PXENV_STATUS_FAILURE | 0x30000000 )
|
|
597
|
+/** Link has been severed */
|
|
598
|
+#define ENOLINK __einfo_error ( EINFO_ENOLINK )
|
|
599
|
+#define EINFO_ENOLINK __einfo ( PXENV_STATUS_FAILURE, 0x30, 0, \
|
|
600
|
+ "Link has been severed" )
|
365
|
601
|
|
366
|
602
|
/** Not enough space */
|
367
|
|
-#define ENOMEM ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x31000000 )
|
|
603
|
+#define ENOMEM __einfo_error ( EINFO_ENOMEM )
|
|
604
|
+#define EINFO_ENOMEM __einfo ( PXENV_STATUS_OUT_OF_RESOURCES, 0x31, 0, \
|
|
605
|
+ "Not enough space" )
|
368
|
606
|
|
369
|
607
|
/** No message of the desired type */
|
370
|
|
-#define ENOMSG ( ERRFILE | PXENV_STATUS_FAILURE | 0x32000000 )
|
|
608
|
+#define ENOMSG __einfo_error ( EINFO_ENOMSG )
|
|
609
|
+#define EINFO_ENOMSG __einfo ( PXENV_STATUS_FAILURE, 0x32, 0, \
|
|
610
|
+ "No message of the desired type" )
|
371
|
611
|
|
372
|
612
|
/** Protocol not available */
|
373
|
|
-#define ENOPROTOOPT ( ERRFILE | PXENV_STATUS_UNSUPPORTED | 0x33000000 )
|
|
613
|
+#define ENOPROTOOPT __einfo_error ( EINFO_ENOPROTOOPT )
|
|
614
|
+#define EINFO_ENOPROTOOPT __einfo ( PXENV_STATUS_UNSUPPORTED, 0x33, 0, \
|
|
615
|
+ "Protocol not available" )
|
374
|
616
|
|
375
|
617
|
/** No space left on device */
|
376
|
|
-#define ENOSPC ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x34000000 )
|
|
618
|
+#define ENOSPC __einfo_error ( EINFO_ENOSPC )
|
|
619
|
+#define EINFO_ENOSPC __einfo ( PXENV_STATUS_OUT_OF_RESOURCES, 0x34, 0, \
|
|
620
|
+ "No space left on device" )
|
377
|
621
|
|
378
|
622
|
/** No STREAM resources */
|
379
|
|
-#define ENOSR ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x35000000 )
|
|
623
|
+#define ENOSR __einfo_error ( EINFO_ENOSR )
|
|
624
|
+#define EINFO_ENOSR __einfo ( PXENV_STATUS_OUT_OF_RESOURCES, 0x35, 0, \
|
|
625
|
+ "No STREAM resources" )
|
380
|
626
|
|
381
|
627
|
/** Not a STREAM */
|
382
|
|
-#define ENOSTR ( ERRFILE | PXENV_STATUS_FAILURE | 0x36000000 )
|
|
628
|
+#define ENOSTR __einfo_error ( EINFO_ENOSTR )
|
|
629
|
+#define EINFO_ENOSTR __einfo ( PXENV_STATUS_FAILURE, 0x36, 0, \
|
|
630
|
+ "Not a STREAM" )
|
383
|
631
|
|
384
|
632
|
/** Function not implemented */
|
385
|
|
-#define ENOSYS ( ERRFILE | PXENV_STATUS_UNSUPPORTED | 0x37000000 )
|
|
633
|
+#define ENOSYS __einfo_error ( EINFO_ENOSYS )
|
|
634
|
+#define EINFO_ENOSYS __einfo ( PXENV_STATUS_UNSUPPORTED, 0x37, 0, \
|
|
635
|
+ "Function not implemented" )
|
386
|
636
|
|
387
|
637
|
/** The socket is not connected */
|
388
|
|
-#define ENOTCONN ( ERRFILE | PXENV_STATUS_FAILURE | 0x38000000 )
|
|
638
|
+#define ENOTCONN __einfo_error ( EINFO_ENOTCONN )
|
|
639
|
+#define EINFO_ENOTCONN __einfo ( PXENV_STATUS_FAILURE, 0x38, 0, \
|
|
640
|
+ "The socket is not connected" )
|
389
|
641
|
|
390
|
642
|
/** Not a directory */
|
391
|
|
-#define ENOTDIR ( ERRFILE | PXENV_STATUS_FAILURE | 0x39000000 )
|
|
643
|
+#define ENOTDIR __einfo_error ( EINFO_ENOTDIR )
|
|
644
|
+#define EINFO_ENOTDIR __einfo ( PXENV_STATUS_FAILURE, 0x39, 0, \
|
|
645
|
+ "Not a directory" )
|
392
|
646
|
|
393
|
647
|
/** Directory not empty */
|
394
|
|
-#define ENOTEMPTY ( ERRFILE | PXENV_STATUS_FAILURE | 0x3a000000 )
|
|
648
|
+#define ENOTEMPTY __einfo_error ( EINFO_ENOTEMPTY )
|
|
649
|
+#define EINFO_ENOTEMPTY __einfo ( PXENV_STATUS_FAILURE, 0x3a, 0, \
|
|
650
|
+ "Directory not empty" )
|
395
|
651
|
|
396
|
652
|
/** Not a socket */
|
397
|
|
-#define ENOTSOCK ( ERRFILE | PXENV_STATUS_FAILURE | 0x3b000000 )
|
|
653
|
+#define ENOTSOCK __einfo_error ( EINFO_ENOTSOCK )
|
|
654
|
+#define EINFO_ENOTSOCK __einfo ( PXENV_STATUS_FAILURE, 0x3b, 0, \
|
|
655
|
+ "Not a socket" )
|
398
|
656
|
|
399
|
|
-/** Not supported */
|
400
|
|
-#define ENOTSUP ( ERRFILE | PXENV_STATUS_UNSUPPORTED | 0x3c000000 )
|
|
657
|
+/** Operation not supported */
|
|
658
|
+#define ENOTSUP __einfo_error ( EINFO_ENOTSUP )
|
|
659
|
+#define EINFO_ENOTSUP __einfo ( PXENV_STATUS_UNSUPPORTED, 0x3c, 0, \
|
|
660
|
+ "Operation not supported" )
|
401
|
661
|
|
402
|
662
|
/** Inappropriate I/O control operation */
|
403
|
|
-#define ENOTTY ( ERRFILE | PXENV_STATUS_FAILURE | 0x3d000000 )
|
|
663
|
+#define ENOTTY __einfo_error ( EINFO_ENOTTY )
|
|
664
|
+#define EINFO_ENOTTY __einfo ( PXENV_STATUS_FAILURE, 0x3d, 0, \
|
|
665
|
+ "Inappropriate I/O control operation" )
|
404
|
666
|
|
405
|
667
|
/** No such device or address */
|
406
|
|
-#define ENXIO ( ERRFILE | PXENV_STATUS_TFTP_FILE_NOT_FOUND | 0x3e000000 )
|
|
668
|
+#define ENXIO __einfo_error ( EINFO_ENXIO )
|
|
669
|
+#define EINFO_ENXIO __einfo ( PXENV_STATUS_TFTP_FILE_NOT_FOUND, 0x3e, 0, \
|
|
670
|
+ "No such device or address" )
|
407
|
671
|
|
408
|
672
|
/** Operation not supported on socket */
|
409
|
|
-#define EOPNOTSUPP ( ERRFILE | PXENV_STATUS_UNSUPPORTED | 0x3f000000 )
|
|
673
|
+#define EOPNOTSUPP __einfo_error ( EINFO_EOPNOTSUPP )
|
|
674
|
+#define EINFO_EOPNOTSUPP __einfo ( PXENV_STATUS_UNSUPPORTED, 0x3f, 0, \
|
|
675
|
+ "Operation not supported on socket" )
|
410
|
676
|
|
411
|
677
|
/** Value too large to be stored in data type */
|
412
|
|
-#define EOVERFLOW ( ERRFILE | PXENV_STATUS_FAILURE | 0x40000000 )
|
|
678
|
+#define EOVERFLOW __einfo_error ( EINFO_EOVERFLOW )
|
|
679
|
+#define EINFO_EOVERFLOW __einfo ( PXENV_STATUS_FAILURE, 0x40, 0, \
|
|
680
|
+ "Value too large to be stored in data type" )
|
413
|
681
|
|
414
|
682
|
/** Operation not permitted */
|
415
|
|
-#define EPERM ( ERRFILE | PXENV_STATUS_TFTP_ACCESS_VIOLATION | 0x41000000 )
|
|
683
|
+#define EPERM __einfo_error ( EINFO_EPERM )
|
|
684
|
+#define EINFO_EPERM __einfo ( PXENV_STATUS_TFTP_ACCESS_VIOLATION, 0x41, 0, \
|
|
685
|
+ "Operation not permitted" )
|
416
|
686
|
|
417
|
687
|
/** Broken pipe */
|
418
|
|
-#define EPIPE ( ERRFILE | PXENV_STATUS_FAILURE | 0x42000000 )
|
|
688
|
+#define EPIPE __einfo_error ( EINFO_EPIPE )
|
|
689
|
+#define EINFO_EPIPE __einfo ( PXENV_STATUS_FAILURE, 0x42, 0, \
|
|
690
|
+ "Broken pipe" )
|
419
|
691
|
|
420
|
692
|
/** Protocol error */
|
421
|
|
-#define EPROTO ( ERRFILE | PXENV_STATUS_FAILURE | 0x43000000 )
|
|
693
|
+#define EPROTO __einfo_error ( EINFO_EPROTO )
|
|
694
|
+#define EINFO_EPROTO __einfo ( PXENV_STATUS_FAILURE, 0x43, 0, \
|
|
695
|
+ "Protocol error" )
|
422
|
696
|
|
423
|
697
|
/** Protocol not supported */
|
424
|
|
-#define EPROTONOSUPPORT ( ERRFILE | PXENV_STATUS_UNSUPPORTED | 0x44000000 )
|
|
698
|
+#define EPROTONOSUPPORT __einfo_error ( EINFO_EPROTONOSUPPORT )
|
|
699
|
+#define EINFO_EPROTONOSUPPORT __einfo ( PXENV_STATUS_UNSUPPORTED, 0x44, 0, \
|
|
700
|
+ "Protocol not supported" )
|
425
|
701
|
|
426
|
702
|
/** Protocol wrong type for socket */
|
427
|
|
-#define EPROTOTYPE ( ERRFILE | PXENV_STATUS_FAILURE | 0x45000000 )
|
|
703
|
+#define EPROTOTYPE __einfo_error ( EINFO_EPROTOTYPE )
|
|
704
|
+#define EINFO_EPROTOTYPE __einfo ( PXENV_STATUS_FAILURE, 0x45, 0, \
|
|
705
|
+ "Protocol wrong type for socket" )
|
428
|
706
|
|
429
|
707
|
/** Result too large */
|
430
|
|
-#define ERANGE ( ERRFILE | PXENV_STATUS_FAILURE | 0x46000000 )
|
|
708
|
+#define ERANGE __einfo_error ( EINFO_ERANGE )
|
|
709
|
+#define EINFO_ERANGE __einfo ( PXENV_STATUS_FAILURE, 0x46, 0, \
|
|
710
|
+ "Result too large" )
|
431
|
711
|
|
432
|
712
|
/** Read-only file system */
|
433
|
|
-#define EROFS ( ERRFILE | PXENV_STATUS_FAILURE | 0x47000000 )
|
|
713
|
+#define EROFS __einfo_error ( EINFO_EROFS )
|
|
714
|
+#define EINFO_EROFS __einfo ( PXENV_STATUS_FAILURE, 0x47, 0, \
|
|
715
|
+ "Read-only file system" )
|
434
|
716
|
|
435
|
717
|
/** Invalid seek */
|
436
|
|
-#define ESPIPE ( ERRFILE | PXENV_STATUS_FAILURE | 0x48000000 )
|
|
718
|
+#define ESPIPE __einfo_error ( EINFO_ESPIPE )
|
|
719
|
+#define EINFO_ESPIPE __einfo ( PXENV_STATUS_FAILURE, 0x48, 0, \
|
|
720
|
+ "Invalid seek" )
|
437
|
721
|
|
438
|
722
|
/** No such process */
|
439
|
|
-#define ESRCH ( ERRFILE | PXENV_STATUS_TFTP_FILE_NOT_FOUND | 0x49000000 )
|
|
723
|
+#define ESRCH __einfo_error ( EINFO_ESRCH )
|
|
724
|
+#define EINFO_ESRCH __einfo ( PXENV_STATUS_TFTP_FILE_NOT_FOUND, 0x49, 0, \
|
|
725
|
+ "No such process" )
|
440
|
726
|
|
441
|
727
|
/** Stale file handle */
|
442
|
|
-#define ESTALE ( ERRFILE | PXENV_STATUS_FAILURE | 0x4a000000 )
|
|
728
|
+#define ESTALE __einfo_error ( EINFO_ESTALE )
|
|
729
|
+#define EINFO_ESTALE __einfo ( PXENV_STATUS_FAILURE, 0x4a, 0, \
|
|
730
|
+ "Stale file handle" )
|
443
|
731
|
|
444
|
|
-/** STREAM ioctl() timeout */
|
445
|
|
-#define ETIME ( ERRFILE | PXENV_STATUS_FAILURE | 0x4b000000 )
|
|
732
|
+/** Timer expired */
|
|
733
|
+#define ETIME __einfo_error ( EINFO_ETIME )
|
|
734
|
+#define EINFO_ETIME __einfo ( PXENV_STATUS_FAILURE, 0x4b, 0, \
|
|
735
|
+ "Timer expired" )
|
446
|
736
|
|
447
|
|
-/** Operation timed out */
|
448
|
|
-#define ETIMEDOUT ( ERRFILE | PXENV_STATUS_TFTP_READ_TIMEOUT | 0x4c000000 )
|
|
737
|
+/** Connection timed out */
|
|
738
|
+#define ETIMEDOUT __einfo_error ( EINFO_ETIMEDOUT )
|
|
739
|
+#define EINFO_ETIMEDOUT __einfo ( PXENV_STATUS_TFTP_READ_TIMEOUT, 0x4c, 0, \
|
|
740
|
+ "Connection timed out" )
|
449
|
741
|
|
450
|
742
|
/** Text file busy */
|
451
|
|
-#define ETXTBSY ( ERRFILE | PXENV_STATUS_FAILURE | 0x4d000000 )
|
|
743
|
+#define ETXTBSY __einfo_error ( EINFO_ETXTBSY )
|
|
744
|
+#define EINFO_ETXTBSY __einfo ( PXENV_STATUS_FAILURE, 0x4d, 0, \
|
|
745
|
+ "Text file busy" )
|
452
|
746
|
|
453
|
|
-/** Operation would block (different from EAGAIN!) */
|
454
|
|
-#define EWOULDBLOCK ( ERRFILE | PXENV_STATUS_TFTP_OPEN | 0x4e000000 )
|
|
747
|
+/** Operation would block */
|
|
748
|
+#define EWOULDBLOCK __einfo_error ( EINFO_EWOULDBLOCK )
|
|
749
|
+#define EINFO_EWOULDBLOCK __einfo ( PXENV_STATUS_TFTP_OPEN, 0x4e, 0, \
|
|
750
|
+ "Operation would block" )
|
455
|
751
|
|
456
|
752
|
/** Improper link */
|
457
|
|
-#define EXDEV ( ERRFILE | PXENV_STATUS_FAILURE | 0x4f000000 )
|
458
|
|
-
|
459
|
|
-/** @} */
|
460
|
|
-
|
461
|
|
-/**
|
462
|
|
- * @defgroup euniq Per-file error disambiguators
|
463
|
|
- *
|
464
|
|
- * Files which use the same error number multiple times should
|
465
|
|
- * probably define their own error subspace using these
|
466
|
|
- * disambiguators. For example:
|
467
|
|
- *
|
468
|
|
- * #define ETCP_HEADER_TOO_SHORT EUNIQ_01
|
469
|
|
- * #define ETCP_BAD_CHECKSUM EUNIQ_02
|
470
|
|
- *
|
471
|
|
- * @{
|
472
|
|
- */
|
473
|
|
-
|
474
|
|
-#define EUNIQ_01 0x00000100
|
475
|
|
-#define EUNIQ_02 0x00000200
|
476
|
|
-#define EUNIQ_03 0x00000300
|
477
|
|
-#define EUNIQ_04 0x00000400
|
478
|
|
-#define EUNIQ_05 0x00000500
|
479
|
|
-#define EUNIQ_06 0x00000600
|
480
|
|
-#define EUNIQ_07 0x00000700
|
481
|
|
-#define EUNIQ_08 0x00000800
|
482
|
|
-#define EUNIQ_09 0x00000900
|
483
|
|
-#define EUNIQ_0A 0x00000a00
|
484
|
|
-#define EUNIQ_0B 0x00000b00
|
485
|
|
-#define EUNIQ_0C 0x00000c00
|
486
|
|
-#define EUNIQ_0D 0x00000d00
|
487
|
|
-#define EUNIQ_0E 0x00000e00
|
488
|
|
-#define EUNIQ_0F 0x00000f00
|
489
|
|
-#define EUNIQ_10 0x00001000
|
490
|
|
-#define EUNIQ_11 0x00001100
|
491
|
|
-#define EUNIQ_12 0x00001200
|
492
|
|
-#define EUNIQ_13 0x00001300
|
493
|
|
-#define EUNIQ_14 0x00001400
|
494
|
|
-#define EUNIQ_15 0x00001500
|
495
|
|
-#define EUNIQ_16 0x00001600
|
496
|
|
-#define EUNIQ_17 0x00001700
|
497
|
|
-#define EUNIQ_18 0x00001800
|
498
|
|
-#define EUNIQ_19 0x00001900
|
499
|
|
-#define EUNIQ_1A 0x00001a00
|
500
|
|
-#define EUNIQ_1B 0x00001b00
|
501
|
|
-#define EUNIQ_1C 0x00001c00
|
502
|
|
-#define EUNIQ_1D 0x00001d00
|
503
|
|
-#define EUNIQ_1E 0x00001e00
|
504
|
|
-#define EUNIQ_1F 0x00001f00
|
|
753
|
+#define EXDEV __einfo_error ( EINFO_EXDEV )
|
|
754
|
+#define EINFO_EXDEV __einfo ( PXENV_STATUS_FAILURE, 0x4f, 0, \
|
|
755
|
+ "Improper link" )
|
505
|
756
|
|
506
|
757
|
/** @} */
|
507
|
758
|
|