|
ginnOS
The reference: libc, the libraries and the kernel
|
Go to the source code of this file.
Macros | |
| #define | ENOSYS 1 |
| posix-compatible errno constants for ginnOS userspace. | |
| #define | EBADF 2 |
| #define | EINVAL 3 |
| #define | ENOMEM 4 |
| #define | ENOENT 5 |
| #define | EACCES 6 |
| #define | EPIPE 7 |
| #define | ESPIPE 8 |
| #define | EEXIST 9 |
| #define | EISDIR 10 |
| #define | ENOTDIR 11 |
| #define | EMFILE 12 |
| #define | ENFILE 13 |
| #define | EIO 14 |
| #define | ENOSPC 15 |
| #define | EBUSY 16 |
| #define | ERANGE 17 |
| #define | EFAULT 18 |
| #define | ESRCH 19 |
| #define | ECHILD 20 |
| #define | ENOBUFS 21 |
| #define | ENOTTY 22 |
| #define | ENODEV 23 |
| #define | EINTR 24 |
| #define | EAGAIN 25 |
| #define | E2BIG 26 |
| #define | ENOEXEC 27 |
| #define | ENOTEMPTY 28 |
| #define | EXDEV 29 |
| #define | ENAMETOOLONG 30 |
| #define | EPERM 31 |
| #define | ELOOP 32 |
| #define | EROFS 33 |
| #define | ETIMEDOUT 34 |
| #define | ENOTSOCK 35 |
| #define | EADDRINUSE 36 |
| #define | ECONNREFUSED 37 |
| #define | EISCONN 38 |
| #define | ENOTCONN 39 |
| #define | EAFNOSUPPORT 40 |
| #define | EPROTONOSUPPORT 41 |
| #define | EOPNOTSUPP 42 |
| #define | ECANCELED 43 |
| #define | EILSEQ 44 |
| #define | EMLINK 45 |
| #define | EFBIG 46 |
| #define | ENOLCK 47 |
| #define | ENXIO 48 |
| #define | EDEADLK 49 |
| #define | EOVERFLOW 50 |
| #define | EADDRNOTAVAIL 51 |
| #define | EDESTADDRREQ 52 |
| #define | EMSGSIZE 53 |
| #define | ENETUNREACH 54 |
| #define | EHOSTUNREACH 55 |
| #define | ENOPROTOOPT 56 |
| #define | EPROTOTYPE 57 |
| #define | ECONNRESET 58 |
| #define | ECONNABORTED 59 |
| #define | EINPROGRESS 60 |
| #define | EALREADY 61 |
| #define | ENETDOWN 62 |
| #define | EPROTO 63 |
| #define | ENOTSUP EOPNOTSUPP |
| #define | EWOULDBLOCK EAGAIN |
| #define | errno (*__errno_location()) |
Functions | |
| int * | __errno_location (void) |
| the calling thread's errno. | |
| void | perror (const char *s) |
| print a message followed by the string for the current errno. | |
| const char * | strerror (int errnum) |
| return a string describing the given error number. | |
| #define ENOSYS 1 |
posix-compatible errno constants for ginnOS userspace.
the numbers are ABI: src/kernel/errno.h has the same ones.
syscalls return negative errno values on failure. the libc wrappers extract the error, store it in errno (one for each thread), and return -1 (or NULL, etc.) to the caller.
| #define EBADF 2 |
| #define EINVAL 3 |
| #define ENOMEM 4 |
| #define ENOENT 5 |
| #define EACCES 6 |
| #define EPIPE 7 |
| #define ESPIPE 8 |
| #define EEXIST 9 |
| #define EISDIR 10 |
| #define ENOTDIR 11 |
| #define EMFILE 12 |
| #define ENFILE 13 |
| #define EIO 14 |
| #define ENOSPC 15 |
| #define EBUSY 16 |
| #define ERANGE 17 |
| #define EFAULT 18 |
| #define ESRCH 19 |
| #define ECHILD 20 |
| #define ENOBUFS 21 |
| #define ENOTTY 22 |
| #define ENODEV 23 |
| #define EINTR 24 |
| #define EAGAIN 25 |
| #define E2BIG 26 |
| #define ENOEXEC 27 |
| #define ENOTEMPTY 28 |
| #define EXDEV 29 |
| #define ENAMETOOLONG 30 |
| #define EPERM 31 |
| #define ELOOP 32 |
| #define EROFS 33 |
| #define ETIMEDOUT 34 |
| #define ENOTSOCK 35 |
| #define EADDRINUSE 36 |
| #define ECONNREFUSED 37 |
| #define EISCONN 38 |
| #define ENOTCONN 39 |
| #define EAFNOSUPPORT 40 |
| #define EPROTONOSUPPORT 41 |
| #define EOPNOTSUPP 42 |
| #define ECANCELED 43 |
| #define EILSEQ 44 |
| #define EMLINK 45 |
| #define EFBIG 46 |
| #define ENOLCK 47 |
| #define ENXIO 48 |
| #define EDEADLK 49 |
| #define EOVERFLOW 50 |
| #define EADDRNOTAVAIL 51 |
| #define EDESTADDRREQ 52 |
| #define EMSGSIZE 53 |
| #define ENETUNREACH 54 |
| #define EHOSTUNREACH 55 |
| #define ENOPROTOOPT 56 |
| #define EPROTOTYPE 57 |
| #define ECONNRESET 58 |
| #define ECONNABORTED 59 |
| #define EINPROGRESS 60 |
| #define EALREADY 61 |
| #define ENETDOWN 62 |
| #define EPROTO 63 |
| #define ENOTSUP EOPNOTSUPP |
| #define EWOULDBLOCK EAGAIN |
| #define errno (*__errno_location()) |
| int * __errno_location | ( | void | ) |
the calling thread's errno.
each thread has its own (thread-local storage), as the functions of one thread must not see the errors of another.
| void perror | ( | const char * | s | ) |
print a message followed by the string for the current errno.
| s | prefix string (may be NULL). |
| const char * strerror | ( | int | errnum | ) |
return a string describing the given error number.
| errnum | error number (one of the E* constants above). |