1 /* 2 * Copyright (c) 2022 Winner Microelectronics Co., Ltd. All rights reserved. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef ERRNO_H 17 #define ERRNO_H 18 19 #ifdef __LITEOS__ 20 #define ENOERR 0 21 #endif 22 #define EPERM 1 23 #define ENOENT 2 24 #define ESRCH 3 25 #define EINTR 4 26 #define EIO 5 27 #define ENXIO 6 28 #define E2BIG 7 29 #define ENOEXEC 8 30 #define EBADF 9 31 #define ECHILD 10 32 #define EAGAIN 11 33 #define ENOMEM 12 34 #define EACCES 13 35 #define EFAULT 14 36 #define ENOTBLK 15 37 #define EBUSY 16 38 #define EEXIST 17 39 #define EXDEV 18 40 #define ENODEV 19 41 #define ENOTDIR 20 42 #define EISDIR 21 43 #define EINVAL 22 44 #define ENFILE 23 45 #define EMFILE 24 46 #define ENOTTY 25 47 #define ETXTBSY 26 48 #define EFBIG 27 49 #define ENOSPC 28 50 #define ESPIPE 29 51 #define EROFS 30 52 #define EMLINK 31 53 #define EPIPE 32 54 #define EDOM 33 55 #define ERANGE 34 56 #define EDEADLK 35 57 #define ENAMETOOLONG 36 58 #define ENOLCK 37 59 #define ENOSYS 38 60 #define ENOTEMPTY 39 61 #define ELOOP 40 62 #define EWOULDBLOCK EAGAIN 63 #define ENOMSG 42 64 #define EIDRM 43 65 #define ECHRNG 44 66 #define EL2NSYNC 45 67 #define EL3HLT 46 68 #define EL3RST 47 69 #define ELNRNG 48 70 #define EUNATCH 49 71 #define ENOCSI 50 72 #define EL2HLT 51 73 #define EBADE 52 74 #define EBADR 53 75 #define EXFULL 54 76 #define ENOANO 55 77 #define EBADRQC 56 78 #define EBADSLT 57 79 #define EDEADLOCK EDEADLK 80 #define EBFONT 59 81 #define ENOSTR 60 82 #define ENODATA 61 83 #define ETIME 62 84 #define ENOSR 63 85 #define ENONET 64 86 #define ENOPKG 65 87 #define EREMOTE 66 88 #define ENOLINK 67 89 #define EADV 68 90 #define ESRMNT 69 91 #define ECOMM 70 92 #define EPROTO 71 93 #define EMULTIHOP 72 94 #define EDOTDOT 73 95 #define EBADMSG 74 96 #define EOVERFLOW 75 97 #define ENOTUNIQ 76 98 #define EBADFD 77 99 #define EREMCHG 78 100 #define ELIBACC 79 101 #define ELIBBAD 80 102 #define ELIBSCN 81 103 #define ELIBMAX 82 104 #define ELIBEXEC 83 105 #define EILSEQ 84 106 #define ERESTART 85 107 #define ESTRPIPE 86 108 #define EUSERS 87 109 #define ENOTSOCK 88 110 #define EDESTADDRREQ 89 111 #define EMSGSIZE 90 112 #define EPROTOTYPE 91 113 #define ENOPROTOOPT 92 114 #define EPROTONOSUPPORT 93 115 #define ESOCKTNOSUPPORT 94 116 #define EOPNOTSUPP 95 117 #define ENOTSUP EOPNOTSUPP 118 #define EPFNOSUPPORT 96 119 #define EAFNOSUPPORT 97 120 #define EADDRINUSE 98 121 #define EADDRNOTAVAIL 99 122 #define ENETDOWN 100 123 #define ENETUNREACH 101 124 #define ENETRESET 102 125 #define ECONNABORTED 103 126 #define ECONNRESET 104 127 #define ENOBUFS 105 128 #define EISCONN 106 129 #define ENOTCONN 107 130 #define ESHUTDOWN 108 131 #define ETOOMANYREFS 109 132 #define ETIMEDOUT 110 133 #define ECONNREFUSED 111 134 #define EHOSTDOWN 112 135 #define EHOSTUNREACH 113 136 #define EALREADY 114 137 #define EINPROGRESS 115 138 #define ESTALE 116 139 #define EUCLEAN 117 140 #define ENOTNAM 118 141 #define ENAVAIL 119 142 #define EISNAM 120 143 #define EREMOTEIO 121 144 #define EDQUOT 122 145 #define ENOMEDIUM 123 146 #define EMEDIUMTYPE 124 147 #define ECANCELED 125 148 #define ENOKEY 126 149 #define EKEYEXPIRED 127 150 #define EKEYREVOKED 128 151 #define EKEYREJECTED 129 152 #define EOWNERDEAD 130 153 #define ENOTRECOVERABLE 131 154 #define ERFKILL 132 155 #define EHWPOISON 133 156 157 #ifdef __LITEOS__ 158 #define EEOF 200 159 #define ENOSUPP 201 160 #define EDEVNOSUPP 202 161 #define EBADHANDLE 521 162 #define ENOTSYNC 522 163 #define EBADCOOKIE 523 164 #define ENOTSUPP 524 165 #define ETOOSMALL 525 166 #define ESERVERFAULT 526 167 #define EBADTYPE 527 168 #define EJUKEBOX 528 169 #define EIOCBQUEUED 529 170 #define EIOCBRETRY 530 171 #endif 172 173 #endif /* ERRNO_H */