FreeNOS
errno.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2009 Niek Linnenbank
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU 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, see <http://www.gnu.org/licenses/>.
16 */
17
18#include <Macros.h>
19#include "errno.h"
20
21int errno USED = 0;
22
23char * error_map[] USED =
24{
25 [-ESUCCESS] = "Success",
26 [-E2BIG] = "Argument list too long",
27 [-EACCES] = "Permission denied",
28 [-EADDRINUSE] = "Address in use",
29 [-EADDRNOTAVAIL] = "Address not available",
30 [-EAFNOSUPPORT] = "Address family not supported",
31 [-EAGAIN] = "Resource temporary unavailable",
32 [-EALREADY] = "Connection already in progress",
33 [-EBADF] = "Bad file descriptor",
34 [-EBADMSG] = "Bad message",
35 [-EBUSY] = "Device or resource busy",
36 [-ECANCELED] = "Operation canceled",
37 [-ECHILD] = "No child processes",
38 [-ECONNABORTED] = "Connection aborted",
39 [-ECONNREFUSED] = "Connection refused",
40 [-ECONNRESET] = "Connection reset",
41 [-EDEADLK] = "Resource deadlock would occur",
42 [-EDESTADDRREQ] = "Destination address required",
43 [-EDOM] = "Mathematics argument out of domain of function",
44 [-EDQUOT] = "Reserved",
45 [-EEXIST] = "File already exists",
46 [-EFAULT] = "Bad address",
47 [-EFBIG] = "File too large",
48 [-EHOSTUNREACH] = "Host is unreachable",
49 [-EIDRM] = "Identifier removed",
50 [-EILSEQ] = "Illegal byte sequence",
51 [-EINPROGRESS] = "Operation in progress",
52 [-EINTR] = "Interrupted function",
53 [-EINVAL] = "Invalid argument",
54 [-EIO] = "I/O error",
55 [-EISCONN] = "Socket is connected",
56 [-EISDIR] = "Is a directory",
57 [-ELOOP] = "Too many levels of symbolic links",
58 [-EMFILE] = "File descriptor value too large",
59 [-EMLINK] = "Too many links",
60 [-EMSGSIZE] = "Message too large",
61 [-EMULTIHOP] = "Reserved",
62 [-ENAMETOOLONG] = "Filename too long",
63 [-ENETDOWN] = "Network is down",
64 [-ENETRESET] = "Connection aborted by network",
65 [-ENETUNREACH] = "Network unreachable",
66 [-ENFILE] = "Too many files open in system",
67 [-ENOBUFS] = "No buffer space available",
68 [-ENODATA] = "No message is available on the STREAM head read queue",
69 [-ENODEV] = "No such device",
70 [-ENOENT] = "No such file or directory",
71 [-ENOEXEC] = "Executable file format error",
72 [-ENOLCK] = "No locks available",
73 [-ENOLINK] = "Reserved",
74 [-ENOMEM] = "Not enough memory space",
75 [-ENOMSG] = "No message of the desired type",
76 [-ENOPROTOOPT] = "Protocol not available",
77 [-ENOSPC] = "No space left on device",
78 [-ENOSR] = "No STREAM resources",
79 [-ENOSTR] = "Not a STREAM",
80 [-ENOSYS] = "Function not supported",
81 [-ENOTCONN] = "The socket is not connected",
82 [-ENOTDIR] = "Not a directory",
83 [-ENOTEMPTY] = "Directory not empty",
84 [-ENOTRECOVERABLE] = "State not recoverable",
85 [-ENOTSOCK] = "Not a socket",
86 [-ENOTSUP] = "Operation not supported",
87 [-ENOTTY] = "Inappropriate I/O control operation",
88 [-ENXIO] = "No such device or address",
89 [-EOPNOTSUPP] = "Operation not supported on socket",
90 [-EOVERFLOW] = "Value too large to be stored in data type",
91 [-EOWNERDEAD] = "Previous owner died",
92 [-EPERM] = "Operation not permitted",
93 [-EPIPE] = "Broken pipe",
94 [-EPROTO] = "Protocol error",
95 [-EPROTONOSUPPORT] = "Protocol not supported",
96 [-EPROTOTYPE] = "Protocol wrong type for socket",
97 [-ERANGE] = "Result too large",
98 [-EROFS] = "Read-only file system",
99 [-ESPIPE] = "Invalid seek",
100 [-ESRCH] = "No such process",
101 [-ESTALE] = "Reserved",
102 [-ETIME] = "Stream ioctl() timeout",
103 [-ETIMEDOUT] = "Connection timed out",
104 [-ETXTBSY] = "Text file busy",
105 [-EWOULDBLOCK] = "Operation would block",
106 [-EXDEV] = "Cross-device link"
107};
int errno USED
Definition errno.c:21
#define ENODATA
No message is available on the STREAM head read queue.
Definition errno.h:172
#define ENOENT
No such file or directory.
Definition errno.h:178
#define ENOSPC
No space left on device.
Definition errno.h:199
#define ESTALE
Reserved.
Definition errno.h:271
#define EEXIST
File exists.
Definition errno.h:103
#define EDESTADDRREQ
Destination address required.
Definition errno.h:94
#define ESPIPE
Invalid seek.
Definition errno.h:265
#define EISCONN
Socket is connected.
Definition errno.h:133
#define EBADMSG
Bad message.
Definition errno.h:70
C char * error_map[]
Contains a array of character strings, representing errno values.
Definition errno.c:23
#define ENXIO
No such device or address.
Definition errno.h:232
#define EINVAL
Invalid argument.
Definition errno.h:127
#define ELOOP
Too many levels of symbolic links.
Definition errno.h:139
#define EXDEV
Cross-device link.
Definition errno.h:286
#define EFAULT
Bad address.
Definition errno.h:106
#define ENETUNREACH
Network unreachable.
Definition errno.h:163
#define ENAMETOOLONG
Filename too long.
Definition errno.h:154
#define ENOSYS
Function not supported.
Definition errno.h:208
#define ECONNABORTED
Connection aborted.
Definition errno.h:82
#define ESRCH
No such process.
Definition errno.h:268
#define EINTR
Interrupted function.
Definition errno.h:124
#define ECHILD
No child processes.
Definition errno.h:79
#define EWOULDBLOCK
Operation would block (may be the same value as [EAGAIN]).
Definition errno.h:283
#define EOPNOTSUPP
Operation not supported on socket (may be the same value as [ENOTSUP]).
Definition errno.h:235
#define EAFNOSUPPORT
Address family not supported.
Definition errno.h:58
#define ENOEXEC
Executable file format error.
Definition errno.h:181
#define EMULTIHOP
Reserved.
Definition errno.h:151
#define EHOSTUNREACH
Host is unreachable.
Definition errno.h:112
#define ESUCCESS
Reports a success operation.
Definition errno.h:43
#define ENFILE
Too many files open in system.
Definition errno.h:166
#define EADDRNOTAVAIL
Address not available.
Definition errno.h:55
#define EDEADLK
Resource deadlock would occur.
Definition errno.h:91
C int errno
The lvalue errno is used by many functions to return error values.
#define ETIMEDOUT
Connection timed out.
Definition errno.h:277
#define EPROTO
Protocol error.
Definition errno.h:250
#define EPIPE
Broken pipe.
Definition errno.h:247
#define EDOM
Mathematics argument out of domain of function.
Definition errno.h:97
#define EADDRINUSE
Address in use.
Definition errno.h:52
#define EMFILE
File descriptor value too large.
Definition errno.h:142
#define ENOLCK
No locks available.
Definition errno.h:184
#define ENOMEM
Not enough space.
Definition errno.h:190
#define EINPROGRESS
Operation in progress.
Definition errno.h:121
#define EIO
I/O error.
Definition errno.h:130
#define ENOSTR
Not a STREAM.
Definition errno.h:205
#define EBUSY
Device or resource busy.
Definition errno.h:73
#define EOVERFLOW
Value too large to be stored in data type.
Definition errno.h:238
#define ENOTSUP
Not supported (may be the same value as [EOPNOTSUPP]).
Definition errno.h:226
#define ENOTDIR
Not a directory.
Definition errno.h:214
#define ENETRESET
Connection aborted by network.
Definition errno.h:160
#define ECANCELED
Operation canceled.
Definition errno.h:76
#define EMLINK
Too many links.
Definition errno.h:145
#define ENOBUFS
No buffer space available.
Definition errno.h:169
#define ENOTEMPTY
Directory not empty.
Definition errno.h:217
#define ERANGE
Result too large.
Definition errno.h:259
#define EALREADY
Connection already in progress.
Definition errno.h:64
#define EDQUOT
Reserved.
Definition errno.h:100
#define ENETDOWN
Network is down.
Definition errno.h:157
#define ECONNREFUSED
Connection refused.
Definition errno.h:85
#define ETXTBSY
Text file busy.
Definition errno.h:280
#define ETIME
Stream ioctl() timeout.
Definition errno.h:274
#define ENODEV
No such device.
Definition errno.h:175
#define E2BIG
Argument list too long.
Definition errno.h:46
#define EACCES
Permission denied.
Definition errno.h:49
#define ENOTTY
Inappropriate I/O control operation.
Definition errno.h:229
#define EBADF
Bad file descriptor.
Definition errno.h:67
#define ENOTRECOVERABLE
State not recoverable.
Definition errno.h:220
#define EILSEQ
Illegal byte sequence.
Definition errno.h:118
#define EROFS
Read-only file system.
Definition errno.h:262
#define ENOPROTOOPT
Protocol not available.
Definition errno.h:196
#define EPROTONOSUPPORT
Protocol not supported.
Definition errno.h:253
#define ENOSR
No STREAM resources.
Definition errno.h:202
#define EIDRM
Identifier removed.
Definition errno.h:115
#define ECONNRESET
Connection reset.
Definition errno.h:88
#define ENOLINK
Reserved.
Definition errno.h:187
#define EPERM
Operation not permitted.
Definition errno.h:244
#define EISDIR
Is a directory.
Definition errno.h:136
#define ENOTSOCK
Not a socket.
Definition errno.h:223
#define EMSGSIZE
Message too large.
Definition errno.h:148
#define ENOMSG
No message of the desired type.
Definition errno.h:193
#define EPROTOTYPE
Protocol wrong type for socket.
Definition errno.h:256
#define EAGAIN
Resource unavailable, try again (may be the same value as [EWOULDBLOCK]).
Definition errno.h:61
#define ENOTCONN
The socket is not connected.
Definition errno.h:211
#define EOWNERDEAD
Previous owner died.
Definition errno.h:241
#define EFBIG
File too large.
Definition errno.h:109