Edison MCU Project
 All Files Functions Typedefs Macros Pages
mcu_errno.h
Go to the documentation of this file.
1 /************************************************************************************
2  * Copyright (c) 2015, Intel Corporation
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without modification,
6  * are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice, this
9  * list of conditions and the following disclaimer.
10  *
11  * 2. Redistributions in binary form must reproduce the above copyright notice,
12  * this list of conditions and the following disclaimer in the documentation and/or
13  * other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18  * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
19  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
20  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
23  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
24  * OF THE POSSIBILITY OF SUCH DAMAGE.
25  ************************************************************************************/
26 
32 #ifndef __MCU_ERRNO_H
33 #define __MCU_ERRNO_H
34 
35 /*
36  * POSIX Error codes
37  */
38 
39 #define EPERM 1 /* Not owner */
40 #define ENOENT 2 /* No such file or directory */
41 #define ESRCH 3 /* No such context */
42 #define EINTR 4 /* Interrupted system call */
43 #define EIO 5 /* I/O error */
44 #define ENXIO 6 /* No such device or address */
45 #define E2BIG 7 /* Arg list too long */
46 #define ENOEXEC 8 /* Exec format error */
47 #define EBADF 9 /* Bad file number */
48 #define ECHILD 10 /* No children */
49 #define EAGAIN 11 /* No more contexts */
50 #define ENOMEM 12 /* Not enough core */
51 #define EACCES 13 /* Permission denied */
52 #define EFAULT 14 /* Bad address */
53 #define ENOTEMPTY 15 /* Directory not empty */
54 #define EBUSY 16 /* Mount device busy */
55 #define EEXIST 17 /* File exists */
56 #define EXDEV 18 /* Cross-device link */
57 #define ENODEV 19 /* No such device */
58 #define ENOTDIR 20 /* Not a directory */
59 #define EISDIR 21 /* Is a directory */
60 #define EINVAL 22 /* Invalid argument */
61 #define ENFILE 23 /* File table overflow */
62 #define EMFILE 24 /* Too many open files */
63 #define ENOTTY 25 /* Not a typewriter */
64 #define ENAMETOOLONG 26 /* File name too long */
65 #define EFBIG 27 /* File too large */
66 #define ENOSPC 28 /* No space left on device */
67 #define ESPIPE 29 /* Illegal seek */
68 #define EROFS 30 /* Read-only file system */
69 #define EMLINK 31 /* Too many links */
70 #define EPIPE 32 /* Broken pipe */
71 #define EDEADLK 33 /* Resource deadlock avoided */
72 #define ENOLCK 34 /* No locks available */
73 #define ENOTSUP 35 /* Unsupported value */
74 #define EMSGSIZE 36 /* Message size */
75 
76 /* ANSI math software */
77 #define EDOM 37 /* Argument too large */
78 #define ERANGE 38 /* Result too large */
79 
80 /* ipc/network software */
81 
82 /* argument errors */
83 #define EDESTADDRREQ 40 /* Destination address required */
84 #define EPROTOTYPE 41 /* Protocol wrong type for socket */
85 #define ENOPROTOOPT 42 /* Protocol not available */
86 #define EPROTONOSUPPORT 43 /* Protocol not supported */
87 #define ESOCKTNOSUPPORT 44 /* Socket type not supported */
88 #define EOPNOTSUPP 45 /* Operation not supported on socket */
89 #define EPFNOSUPPORT 46 /* Protocol family not supported */
90 #define EAFNOSUPPORT 47 /* Addr family not supported */
91 #define EADDRINUSE 48 /* Address already in use */
92 #define EADDRNOTAVAIL 49 /* Can't assign requested address */
93 #define ENOTSOCK 50 /* Socket operation on non-socket */
94 
95 /* operational errors */
96 #define ENETUNREACH 51 /* Network is unreachable */
97 #define ENETRESET 52 /* Network dropped connection on reset */
98 #define ECONNABORTED 53 /* Software caused connection abort */
99 #define ECONNRESET 54 /* Connection reset by peer */
100 #define ENOBUFS 55 /* No buffer space available */
101 #define EISCONN 56 /* Socket is already connected */
102 #define ENOTCONN 57 /* Socket is not connected */
103 #define ESHUTDOWN 58 /* Can't send after socket shutdown */
104 #define ETOOMANYREFS 59 /* Too many references: can't splice */
105 #define ETIMEDOUT 60 /* Connection timed out */
106 #define ECONNREFUSED 61 /* Connection refused */
107 #define ENETDOWN 62 /* Network is down */
108 #define ETXTBSY 63 /* Text file busy */
109 #define ELOOP 64 /* Too many levels of symbolic links */
110 #define EHOSTUNREACH 65 /* No route to host */
111 #define ENOTBLK 66 /* Block device required */
112 #define EHOSTDOWN 67 /* Host is down */
113 
114 /* non-blocking and interrupt i/o */
115 #define EINPROGRESS 68 /* Operation now in progress */
116 #define EALREADY 69 /* Operation already in progress */
117 #define EWOULDBLOCK 70 /* Operation would block */
118 
119 #define ENOSYS 71 /* Function not implemented */
120 
121 /* aio errors (should be under posix) */
122 #define ECANCELED 72 /* Operation canceled */
123 
124 #define ERRMAX 81
125 
126 /* specific STREAMS errno values */
127 
128 #define ENOSR 74 /* Insufficient memory */
129 #define ENOSTR 75 /* STREAMS device required */
130 #define EPROTO 76 /* Generic STREAMS error */
131 #define EBADMSG 77 /* Invalid STREAMS message */
132 #define ENODATA 78 /* Missing expected message data */
133 #define ETIME 79 /* STREAMS timeout occurred */
134 #define ENOMSG 80 /* Unexpected message type */
135 
136 /* Other errno */
137 
138 #endif