source: trunk/kernel/libk/errno.h @ 440

Last change on this file since 440 was 1, checked in by alain, 8 years ago

First import

File size: 9.0 KB
Line 
1/*
2 * errno.h - list of all error codes used by the kernel
3 *
4 * Authors   Ghassan Almaless (2007,2008,2009,2010,2011,2012)
5 *           Mohamed Lamine Karaoui (2015)
6 *           Alain Greiner (2016)
7 *
8 * Copyright (c)  UPMC Sorbonne Universites
9 *
10 * This file is part of ALMOS-MKH.
11 *
12 * ALMOS-MKH is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; version 2.0 of the License.
15 *
16 * ALMOS-MKH is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19 * General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with ALMOS-MKH; if not, write to the Free Software Foundation,
23 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#ifndef _ERRNO_H_
27#define _ERRNO_H_
28
29#define EPERM            1  /* Operation not permitted */
30#define ENOENT           2      /* No such file or directory */
31#define ESRCH            3      /* No such process */
32#define EINTR                    4      /* Interrupted system call */
33#define EIO                          5  /* I/O error */
34#define ENXIO                    6      /* No such device or address */
35#define E2BIG            7  /* Arg list too long */
36#define ENOEXEC          8  /* Exec format error */
37#define EBADF            9      /* Bad file number */
38#define ECHILD          10  /* No child processes */
39#define EAGAIN          11  /* Try again */
40#define ENOMEM          12  /* Out of memory */
41#define EACCES          13  /* Permission denied */
42#define EFAULT          14  /* Bad address */
43#define ENOTBLK         15  /* Block device required */
44#define EBUSY           16      /* Device or resource busy */
45#define EEXIST          17      /* File exists */
46#define EXDEV           18      /* Cross-device link */
47#define ENODEV          19      /* No such device */
48#define ENOTDIR         20      /* Not a directory */
49#define EISDIR          21      /* Is a directory */
50#define EINVAL          22      /* Invalid argument */
51#define ENFILE          23      /* File table overflow */
52#define EMFILE          24      /* Too many open files */
53#define ENOTTY          25      /* Not a typewriter */
54#define ETXTBSY         26      /* Text file busy */
55#define EFBIG           27      /* File too large */
56#define ENOSPC          28      /* No space left on device */
57#define ESPIPE          29      /* Illegal seek */
58#define EROFS           30      /* Read-only file system */
59#define EMLINK          31      /* Too many links */
60#define EPIPE           32      /* Broken pipe */
61#define EDOM            33      /* Math argument out of domain of func */
62#define ERANGE          34      /* Math result not representable */
63#define EDEADLK         35      /* Resource deadlock would occur */
64#define ENAMETOOLONG    36      /* File name too long */
65#define ENOLCK          37      /* No record locks available */
66#define ENOSYS          38      /* Function not implemented */
67#define ENOTEMPTY       39      /* Directory not empty */
68#define ELOOP           40      /* Too many symbolic links encountered */
69#define EWOULDBLOCK         41  /* Operation would block */
70#define ENOMSG          42      /* No message of desired type */
71#define EIDRM           43      /* Identifier removed */
72#define ECHRNG          44      /* Channel number out of range */
73#define EL2NSYNC        45      /* Level 2 not synchronized */
74#define EL3HLT          46      /* Level 3 halted */
75#define EL3RST          47      /* Level 3 reset */
76#define ELNRNG          48      /* Link number out of range */
77#define EUNATCH         49      /* Protocol driver not attached */
78#define ENOCSI          50      /* No CSI structure available */
79#define EL2HLT          51      /* Level 2 halted */
80#define EBADE           52      /* Invalid exchange */
81#define EBADR           53      /* Invalid request descriptor */
82#define EXFULL          54      /* Exchange full */
83#define ENOANO          55      /* No anode */
84#define EBADRQC         56      /* Invalid request code */
85#define EBADSLT         57      /* Invalid slot */
86#define EDEADLOCK       58  /* Resource deadlock would occur */
87#define EBFONT          59      /* Bad font file format */
88#define ENOSTR          60      /* Device not a stream */
89#define ENODATA         61      /* No data available */
90#define ETIME           62      /* Timer expired */
91#define ENOSR           63      /* Out of streams resources */
92#define ENONET          64      /* Machine is not on the network */
93#define ENOPKG          65      /* Package not installed */
94#define EREMOTE         66      /* Object is remote */
95#define ENOLINK         67      /* Link has been severed */
96#define EADV            68      /* Advertise error */
97#define ESRMNT          69      /* Srmount error */
98#define ECOMM           70      /* Communication error on send */
99#define EPROTO          71      /* Protocol error */
100#define EMULTIHOP       72      /* Multihop attempted */
101#define EDOTDOT         73      /* RFS specific error */
102#define EBADMSG         74      /* Not a data message */
103#define EOVERFLOW       75      /* Value too large for defined data type */
104#define ENOTUNIQ        76      /* Name not unique on network */
105#define EBADFD          77      /* File descriptor in bad state */
106#define EREMCHG         78      /* Remote address changed */
107#define ELIBACC         79      /* Can not access a needed shared library */
108#define ELIBBAD         80      /* Accessing a corrupted shared library */
109#define ELIBSCN         81      /* .lib section in a.out corrupted */
110#define ELIBMAX         82      /* Attempting to link in too many shared libraries */
111#define ELIBEXEC        83      /* Cannot exec a shared library directly */
112#define EILSEQ          84      /* Illegal byte sequence */
113#define ERESTART        85      /* Interrupted system call should be restarted */
114#define ESTRPIPE        86      /* Streams pipe error */
115#define EUSERS          87      /* Too many users */
116#define ENOTSOCK        88      /* Socket operation on non-socket */
117#define EDESTADDRREQ    89      /* Destination address required */
118#define EMSGSIZE        90      /* Message too long */
119#define EPROTOTYPE      91      /* Protocol wrong type for socket */
120#define ENOPROTOOPT     92      /* Protocol not available */
121#define EPROTONOSUPPORT 93      /* Protocol not supported */
122#define ESOCKTNOSUPPORT 94      /* Socket type not supported */
123#define EOPNOTSUPP      95      /* Operation not supported on transport endpoint */
124#define ENOTSUP         95  /* Operation not supported on transport endpoint */
125#define EPFNOSUPPORT    96      /* Protocol family not supported */
126#define EAFNOSUPPORT    97      /* Address family not supported by protocol */
127#define EADDRINUSE      98      /* Address already in use */
128#define EADDRNOTAVAIL   99      /* Cannot assign requested address */
129#define ENETDOWN       100      /* Network is down */
130#define ENETUNREACH    101      /* Network is unreachable */
131#define ENETRESET      102      /* Network dropped connection because of reset */
132#define ECONNABORTED   103      /* Software caused connection abort */
133#define ECONNRESET     104      /* Connection reset by peer */
134#define ENOBUFS        105      /* No buffer space available */
135#define EISCONN        106      /* Transport endpoint is already connected */
136#define ENOTCONN       107      /* Transport endpoint is not connected */
137#define ESHUTDOWN      108      /* Cannot send after transport endpoint shutdown */
138#define ETOOMANYREFS   109      /* Too many references: cannot splice */
139#define ETIMEDOUT      110      /* Connection timed out */
140#define ECONNREFUSED   111      /* Connection refused */
141#define EHOSTDOWN      112      /* Host is down */
142#define EHOSTUNREACH   113      /* No route to host */
143#define EALREADY       114      /* Operation already in progress */
144#define EINPROGRESS        115  /* Operation now in progress */
145#define ESTALE         116      /* Stale NFS file handle */
146#define EUCLEAN        117      /* Structure needs cleaning */
147#define ENOTNAM        118      /* Not a XENIX named type file */
148#define ENAVAIL        119      /* No XENIX semaphores available */
149#define EISNAM         120      /* Is a named type file */
150#define EREMOTEIO      121      /* Remote I/O error */
151#define EDQUOT         122      /* Quota exceeded */
152#define EUNKNOWN       123      /* Unknown error */
153#define EBADBLK        124  /* Bad block */
154#define EEODIR         125      /* End of Directory */
155#define ENOTSUPPORTED  126  /* Asked service is not supported */
156#define ENOKEY         127      /* Required key not available */
157#define EKEYEXPIRED    128      /* Key has expired */
158#define EKEYREVOKED    129      /* Key has been revoked */
159#define EKEYREJECTED   130      /* Key was rejected by service */
160#define ENOMEDIUM      131      /* No medium found */
161#define EMEDIUMTYPE    132      /* Wrong medium type */
162#define ECANCELED      133      /* Operation Canceled */
163#define __SYS_NERR  ((ECANCELED) + 1)
164
165#define VFS_FOUND            0
166#define VFS_NOT_FOUND        ENOENT
167#define VFS_ENOMEM           ENOMEM
168#define VFS_ENOSPC           ENOSPC
169#define VFS_IO_ERR           EIO
170#define VFS_EUNKNOWN         EUNKNOWN
171#define VFS_EINVAL           EINVAL
172#define VFS_EBADBLK          EBADBLK
173#define VFS_EEXIST           EEXIST
174#define VFS_EISDIR           EISDIR
175#define VFS_EBADF            EBADF
176#define VFS_EISPIPE          EISPIPE
177#define VFS_EOVERFLOW        EOVERFLOW
178#define VFS_ENOTDIR          ENOTDIR
179#define VFS_EODIR            EEODIR
180#define VFS_ENOTUSED         ENOTSUPPORTED
181#define VFS_EPIPE            EPIPE
182#define VFS_ENOTEMPTY        ENOTEMPTY
183
184#endif  /* _ERRNO_H_ */
Note: See TracBrowser for help on using the repository browser.