nlib
Platform_errno.h
1
2
/*--------------------------------------------------------------------------------*
3
Project: CrossRoad
4
Copyright (C)Nintendo All rights reserved.
5
6
These coded instructions, statements, and computer programs contain proprietary
7
information of Nintendo and/or its licensed developers and are protected by
8
national and international copyright laws. They may not be disclosed to third
9
parties or copied or duplicated in any form, in whole or in part, without the
10
prior written consent of Nintendo.
11
12
The content herein is highly confidential and should be handled accordingly.
13
*--------------------------------------------------------------------------------*/
14
15
#pragma once
16
#ifndef INCLUDE_NN_NLIB_PLATFORM_ERRNO_H_
17
#define INCLUDE_NN_NLIB_PLATFORM_ERRNO_H_
18
19
#ifndef INCLUDE_NN_NLIB_PLATFORM_H_
20
#error Do not include this file directly
21
#endif
22
23
/*
24
err=( \
25
"E2BIG" "EACCES" "EADDRINUSE" "EADDRNOTAVAIL" "EAFNOSUPPORT" "EAGAIN" "EALREADY" "EBADF" \
26
"EBADMSG" "EBUSY" "ECANCELED" "ECHILD" "ECONNABORTED" "ECONNREFUSED" "ECONNRESET" "EDEADLK" \
27
"EDESTADDRREQ" "EDOM" "EDQUOT" "EEXIST" "EFAULT" "EFBIG" "EHOSTUNREACH" "EIDRM" "EILSEQ" \
28
"EINPROGRESS" "EINTR" "EINVAL" "EIO" "EISCONN" "EISDIR" "ELOOP" "EMFILE" "EMLINK" "EMSGSIZE" \
29
"EMULTIHOP" "ENAMETOOLONG" "ENETDOWN" "ENETRESET" "ENETUNREACH" "ENFILE" "ENOBUFS" "ENODATA" \
30
"ENODEV" "ENOENT" "ENOEXEC" "ENOLCK" "ENOLINK" "ENOMEM" "ENOMSG" "ENOPROTOOPT" "ENOSPC" \
31
"ENOSR" "ENOSYS" "ENOTCONN" "ENOTDIR" "ENOTEMPTY" "ENOTRECOVERABLE" "ENOTSOCK" "ENOTSUP" \
32
"ENOTTY" "ENXIO" "EOPNOTSUPP" "EOVERFLOW" "EOWNERDEAD" "EPERM" "EPIPE" "EPROTO" \
33
"EPROTONOSUPPORT" "EPROTOTYPE" "ERANGE" "EROFS" "ESPIPE" "ESRCH" "ESTALE" "ETIME" "ETIMEDOUT" \
34
"ETXTBSY" "EWOULDBLOCK" "EXDEV" \
35
)
36
files=($(find . | grep errno))
37
for e in ${err[@]}
38
do
39
grep "\s$e\s" ${files[@]} > /dev/null
40
if [ $? -gt 0 ]; then
41
echo "$e is missing"
42
fi
43
done
44
*/
45
46
#define NLIB_E_BASE 2000
47
48
// if boost/cerrno.hpp has definitions on errno values,
49
// nlib defines the same values which boost/cerrno.hpp defines.
50
51
// [E2BIG]
52
// Argument list too long.
53
#ifndef E2BIG
54
# define E2BIG 9946
55
#endif
56
57
// [EACCES]
58
// Permission denied.
59
#ifndef EACCES
60
# define EACCES 9973
61
#endif
62
63
// [EADDRINUSE]
64
// Address in use.
65
#ifndef EADDRINUSE
66
# define EADDRINUSE 9902
67
#endif
68
69
// [EADDRNOTAVAIL]
70
// Address not available.
71
#ifndef EADDRNOTAVAIL
72
# define EADDRNOTAVAIL 9903
73
#endif
74
75
// [EAFNOSUPPORT]
76
// Address family not supported.
77
#ifndef EAFNOSUPPORT
78
# define EAFNOSUPPORT 9901
79
#endif
80
81
// [EAGAIN]
82
// Resource unavailable, try again (may be the same value as [EWOULDBLOCK]).
83
#ifndef EAGAIN
84
# define EAGAIN 9976
85
#endif
86
87
// [EALREADY]
88
// Connection already in progress.
89
#ifndef EALREADY
90
# define EALREADY 9907
91
#endif
92
93
// [EBADF]
94
// Bad file descriptor.
95
#ifndef EBADF
96
# define EBADF 9949
97
#endif
98
99
// [EBADMSG]
100
// Bad message.
101
#ifndef EBADMSG
102
# define EBADMSG 9905
103
#endif
104
105
// [EBUSY]
106
// Device or resource busy.
107
#ifndef EBUSY
108
# define EBUSY 9952
109
#endif
110
111
// [ECANCELED]
112
// Operation canceled.
113
#ifndef ECANCELED
114
# define ECANCELED 9927
115
#endif
116
117
// [ECHILD]
118
// No child processes.
119
#ifndef ECHILD
120
# define ECHILD 9963
121
#endif
122
123
// [ECONNABORTED]
124
// Connection aborted.
125
#ifndef ECONNABORTED
126
# define ECONNABORTED 9906
127
#endif
128
129
// [ECONNREFUSED]
130
// Connection refused.
131
#ifndef ECONNREFUSED
132
# define ECONNREFUSED 9908
133
#endif
134
135
// [ECONNRESET]
136
// Connection reset.
137
#ifndef ECONNRESET
138
# define ECONNRESET 9909
139
#endif
140
141
// [EDEADLK]
142
// Resource deadlock would occur.
143
#ifndef EDEADLK
144
# define EDEADLK 9975
145
#endif
146
147
// [EDESTADDRREQ]
148
// Destination address required.
149
#ifndef EDESTADDRREQ
150
# define EDESTADDRREQ 9910
151
#endif
152
153
// [EDOM]
154
// Mathematics argument out of domain of function.
155
#ifndef EDOM
156
# define EDOM 9947
157
#endif
158
159
// [EDQUOT]
160
// Reserved.
161
#ifndef EDQUOT
162
# define EDQUOT (NLIB_E_BASE + 19)
163
#endif
164
165
// [EEXIST]
166
// File exists.
167
#ifndef EEXIST
168
# define EEXIST 9955
169
#endif
170
171
// [EFAULT]
172
// Bad address.
173
#ifndef EFAULT
174
# define EFAULT 9948
175
#endif
176
177
// [EFBIG]
178
// File too large.
179
#ifndef EFBIG
180
# define EFBIG 9956
181
#endif
182
183
// [EHOSTUNREACH]
184
// Host is unreachable.
185
#ifndef EHOSTUNREACH
186
# define EHOSTUNREACH 9911
187
#endif
188
189
// [EIDRM]
190
// Identifier removed.
191
#ifndef EIDRM
192
# define EIDRM 9912
193
#endif
194
195
// [EILSEQ]
196
// Illegal byte sequence.
197
#ifndef EILSEQ
198
# define EILSEQ 9945
199
#endif
200
201
// [EINPROGRESS]
202
// Operation in progress.
203
#ifndef EINPROGRESS
204
# define EINPROGRESS 9928
205
#endif
206
207
// [EINTR]
208
// Interrupted function.
209
#ifndef EINTR
210
# define EINTR 9959
211
#endif
212
213
// [EINVAL]
214
// Invalid argument.
215
#ifndef EINVAL
216
# define EINVAL 9943
217
#endif
218
219
// [EIO]
220
// I/O error.
221
#ifndef EIO
222
# define EIO 9961
223
#endif
224
225
// [EISCONN]
226
// Socket is connected.
227
#ifndef EISCONN
228
# define EISCONN 9904
229
#endif
230
231
// [EISDIR]
232
// Is a directory.
233
#ifndef EISDIR
234
# define EISDIR 9962
235
#endif
236
237
// [ELOOP]
238
// Too many levels of symbolic links.
239
#ifndef ELOOP
240
# define ELOOP 9939
241
#endif
242
243
// [EMFILE]
244
// File descriptor value too large.
245
#ifndef EMFILE
246
# define EMFILE 9978
247
#endif
248
249
// [EMLINK]
250
// Too many links.
251
#ifndef EMLINK
252
# define EMLINK 9979
253
#endif
254
255
// [EMSGSIZE]
256
// Message too large.
257
#ifndef EMSGSIZE
258
# define EMSGSIZE 9913
259
#endif
260
261
// [EMULTIHOP]
262
// Reserved.
263
#ifndef EMULTIHOP
264
# define EMULTIHOP (NLIB_E_BASE + 36)
265
#endif
266
267
// [ENAMETOOLONG]
268
// Filename too long.
269
#ifndef ENAMETOOLONG
270
# define ENAMETOOLONG 9957
271
#endif
272
273
// [ENETDOWN]
274
// Network is down.
275
#ifndef ENETDOWN
276
# define ENETDOWN 9914
277
#endif
278
279
// [ENETRESET]
280
// Connection aborted by network.
281
#ifndef ENETRESET
282
# define ENETRESET 9915
283
#endif
284
285
// [ENETUNREACH]
286
// Network unreachable.
287
#ifndef ENETUNREACH
288
# define ENETUNREACH 9916
289
#endif
290
291
// [ENFILE]
292
// Too many files open in system.
293
#ifndef ENFILE
294
# define ENFILE 9977
295
#endif
296
297
// [ENOBUFS]
298
// No buffer space available.
299
#ifndef ENOBUFS
300
# define ENOBUFS 9917
301
#endif
302
303
// [ENODATA]
304
// [OB XSR] [Option Start] No message is available on the STREAM head read queue. [Option End]
305
#ifndef ENODATA
306
# define ENODATA 9919
307
#endif
308
309
// [ENODEV]
310
// No such device.
311
#ifndef ENODEV
312
# define ENODEV 9967
313
#endif
314
315
// [ENOENT]
316
// No such file or directory.
317
#ifndef ENOENT
318
# define ENOENT 9968
319
#endif
320
321
// [ENOEXEC]
322
// Executable file format error.
323
#ifndef ENOEXEC
324
# define ENOEXEC 9954
325
#endif
326
327
// [ENOLCK]
328
// No locks available.
329
#ifndef ENOLCK
330
# define ENOLCK 9964
331
#endif
332
333
// [ENOLINK]
334
// Reserved.
335
#ifndef ENOLINK
336
# define ENOLINK 9918
337
#endif
338
339
// [ENOMEM]
340
// Not enough space.
341
#ifndef ENOMEM
342
# define ENOMEM 9971
343
#endif
344
345
// [ENOMSG]
346
// No message of the desired type.
347
#ifndef ENOMSG
348
# define ENOMSG 9920
349
#endif
350
351
// [ENOPROTOOPT]
352
// Protocol not available.
353
#ifndef ENOPROTOOPT
354
# define ENOPROTOOPT 9921
355
#endif
356
357
// [ENOSPC]
358
// No space left on device.
359
#ifndef ENOSPC
360
# define ENOSPC 9965
361
#endif
362
363
// [ENOSR]
364
// [OB XSR] [Option Start] No STREAM resources. [Option End]
365
#ifndef ENOSR
366
# define ENOSR 9922
367
#endif
368
369
// [ENOSTR]
370
// [OB XSR] [Option Start] Not a STREAM. [Option End]
371
#ifndef ENOSTR
372
# define ENOSTR 9924
373
#endif
374
375
// [ENOSYS]
376
// Function not supported.
377
#ifndef ENOSYS
378
# define ENOSYS 9942
379
#endif
380
381
// [ENOTCONN]
382
// The socket is not connected.
383
#ifndef ENOTCONN
384
# define ENOTCONN 9925
385
#endif
386
387
// [ENOTDIR]
388
// Not a directory or a symbolic link to a directory.
389
#ifndef ENOTDIR
390
# define ENOTDIR 9970
391
#endif
392
393
// [ENOTEMPTY]
394
// Directory not empty.
395
#ifndef ENOTEMPTY
396
# define ENOTEMPTY 9953
397
#endif
398
399
// [ENOTRECOVERABLE]
400
// State not recoverable.
401
#ifndef ENOTRECOVERABLE
402
# define ENOTRECOVERABLE 9934
403
#endif
404
405
// [ENOTSOCK]
406
// Not a socket.
407
#ifndef ENOTSOCK
408
# define ENOTSOCK 9923
409
#endif
410
411
// [ENOTSUP]
412
// Not supported (may be the same value as [EOPNOTSUPP]).
413
#ifndef ENOTSUP
414
# define ENOTSUP 9926
415
#endif
416
417
// [ENOTTY]
418
// Inappropriate I/O control operation.
419
#ifndef ENOTTY
420
# define ENOTTY 9958
421
#endif
422
423
// [ENXIO]
424
// No such device or address.
425
#ifndef ENXIO
426
# define ENXIO 9966
427
#endif
428
429
// [EOPNOTSUPP]
430
// Operation not supported on socket (may be the same value as [ENOTSUP]).
431
#ifndef EOPNOTSUPP
432
# define EOPNOTSUPP 9929
433
#endif
434
435
// [EOVERFLOW]
436
// Value too large to be stored in data type.
437
#ifndef EOVERFLOW
438
# define EOVERFLOW 9940
439
#endif
440
441
// [EOWNERDEAD]
442
// Previous owner died.
443
#ifndef EOWNERDEAD
444
# define EOWNERDEAD 9931
445
#endif
446
447
// [EPERM]
448
// Operation not permitted.
449
#ifndef EPERM
450
# define EPERM 9972
451
#endif
452
453
// [EPIPE]
454
// Broken pipe.
455
#ifndef EPIPE
456
# define EPIPE 9950
457
#endif
458
459
// [EPROTO]
460
// Protocol error.
461
#ifndef EPROTO
462
# define EPROTO 9932
463
#endif
464
465
// [EPROTONOSUPPORT]
466
// Protocol not supported.
467
#ifndef EPROTONOSUPPORT
468
# define EPROTONOSUPPORT 9933
469
#endif
470
471
// [EPROTOTYPE]
472
// Protocol wrong type for socket.
473
#ifndef EPROTOTYPE
474
# define EPROTOTYPE 9941
475
#endif
476
477
// [ERANGE]
478
// Result too large.
479
#ifndef ERANGE
480
# define ERANGE 9944
481
#endif
482
483
// [EROFS]
484
// Read-only file system.
485
#ifndef EROFS
486
# define EROFS 9974
487
#endif
488
489
// [ESPIPE]
490
// Invalid seek.
491
#ifndef ESPIPE
492
# define ESPIPE 9960
493
#endif
494
495
// [ESRCH]
496
// No such process.
497
#ifndef ESRCH
498
# define ESRCH 9969
499
#endif
500
501
// [ESTALE]
502
// Reserved.
503
#ifndef ESTALE
504
# define ESTALE (NLIB_E_BASE + 75)
505
#endif
506
507
// [ETIME]
508
// [OB XSR] [Option Start] Stream ioctl() timeout. [Option End]
509
#ifndef ETIME
510
# define ETIME 9935
511
#endif
512
513
// [ETIMEDOUT]
514
// Connection timed out.
515
#ifndef ETIMEDOUT
516
# define ETIMEDOUT 9938
517
#endif
518
519
// [ETXTBSY]
520
// Text file busy.
521
#ifndef ETXTBSY
522
# define ETXTBSY 9936
523
#endif
524
525
// [EWOULDBLOCK]
526
// Operation would block (may be the same value as [EAGAIN]).
527
#ifndef EWOULDBLOCK
528
# define EWOULDBLOCK 9930
529
#endif
530
531
// [EXDEV]
532
// Cross-device link.
533
#ifndef EXDEV
534
# define EXDEV 9951
535
#endif
536
537
#endif // INCLUDE_NN_NLIB_PLATFORM_ERRNO_H_
© 2012-2017 Nintendo Co., Ltd. All rights reserved.