1 /* 2 * Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, 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 * 2. Redistributions in binary form must reproduce the above copyright notice, 11 * this list of conditions and the following disclaimer in the documentation 12 * and/or other materials provided with the distribution. 13 * 14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * 25 */ 26 27 #ifndef _FSTACK_ERRNO_H 28 #define _FSTACK_ERRNO_H 29 30 #define ff_EPERM 1 /* Operation not permitted */ 31 #define ff_ENOENT 2 /* No such file or directory */ 32 #define ff_ESRCH 3 /* No such process */ 33 #define ff_EINTR 4 /* Interrupted system call */ 34 #define ff_EIO 5 /* Input/output error */ 35 #define ff_ENXIO 6 /* Device not configured */ 36 #define ff_E2BIG 7 /* Argument list too long */ 37 #define ff_ENOEXEC 8 /* Exec format error */ 38 #define ff_EBADF 9 /* Bad file descriptor */ 39 #define ff_ECHILD 10 /* No child processes */ 40 #define ff_EDEADLK 11 /* Resource deadlock avoided */ 41 #define ff_ENOMEM 12 /* Cannot allocate memory */ 42 #define ff_EACCES 13 /* Permission denied */ 43 #define ff_EFAULT 14 /* Bad address */ 44 #define ff_ENOTBLK 15 /* Block device required */ 45 #define ff_EBUSY 16 /* Device busy */ 46 #define ff_EEXIST 17 /* File exists */ 47 #define ff_EXDEV 18 /* Cross-device link */ 48 #define ff_ENODEV 19 /* Operation not supported by device */ 49 #define ff_ENOTDIR 20 /* Not a directory */ 50 #define ff_EISDIR 21 /* Is a directory */ 51 #define ff_EINVAL 22 /* Invalid argument */ 52 #define ff_ENFILE 23 /* Too many open files in system */ 53 #define ff_EMFILE 24 /* Too many open files */ 54 #define ff_ENOTTY 25 /* Inappropriate ioctl for device */ 55 #define ff_ETXTBSY 26 /* Text file busy */ 56 #define ff_EFBIG 27 /* File too large */ 57 #define ff_ENOSPC 28 /* No space left on device */ 58 #define ff_ESPIPE 29 /* Illegal seek */ 59 #define ff_EROFS 30 /* Read-only filesystem */ 60 #define ff_EMLINK 31 /* Too many links */ 61 #define ff_EPIPE 32 /* Broken pipe */ 62 63 /* math software */ 64 #define ff_EDOM 33 /* Numerical argument out of domain */ 65 #define ff_ERANGE 34 /* Result too large */ 66 67 /* non-blocking and interrupt i/o */ 68 #define ff_EAGAIN 35 /* Resource temporarily unavailable */ 69 #define ff_EWOULDBLOCK ff_EAGAIN /* Operation would block */ 70 #define ff_EINPROGRESS 36 /* Operation now in progress */ 71 #define ff_EALREADY 37 /* Operation already in progress */ 72 73 /* ipc/network software -- argument errors */ 74 #define ff_ENOTSOCK 38 /* Socket operation on non-socket */ 75 #define ff_EDESTADDRREQ 39 /* Destination address required */ 76 #define ff_EMSGSIZE 40 /* Message too long */ 77 #define ff_EPROTOTYPE 41 /* Protocol wrong type for socket */ 78 #define ff_ENOPROTOOPT 42 /* Protocol not available */ 79 #define ff_EPROTONOSUPPORT 43 /* Protocol not supported */ 80 #define ff_ESOCKTNOSUPPORT 44 /* Socket type not supported */ 81 #define ff_EOPNOTSUPP 45 /* Operation not supported */ 82 #define ff_ENOTSUP ff_EOPNOTSUPP /* Operation not supported */ 83 #define ff_EPFNOSUPPORT 46 /* Protocol family not supported */ 84 #define ff_EAFNOSUPPORT 47 /* Address family not supported by protocol family */ 85 #define ff_EADDRINUSE 48 /* Address already in use */ 86 #define ff_EADDRNOTAVAIL 49 /* Can't assign requested address */ 87 88 /* ipc/network software -- operational errors */ 89 #define ff_ENETDOWN 50 /* Network is down */ 90 #define ff_ENETUNREACH 51 /* Network is unreachable */ 91 #define ff_ENETRESET 52 /* Network dropped connection on reset */ 92 #define ff_ECONNABORTED 53 /* Software caused connection abort */ 93 #define ff_ECONNRESET 54 /* Connection reset by peer */ 94 #define ff_ENOBUFS 55 /* No buffer space available */ 95 #define ff_EISCONN 56 /* Socket is already connected */ 96 #define ff_ENOTCONN 57 /* Socket is not connected */ 97 #define ff_ESHUTDOWN 58 /* Can't send after socket shutdown */ 98 #define ff_ETOOMANYREFS 59 /* Too many references: can't splice */ 99 #define ff_ETIMEDOUT 60 /* Operation timed out */ 100 #define ff_ECONNREFUSED 61 /* Connection refused */ 101 102 #define ff_ELOOP 62 /* Too many levels of symbolic links */ 103 #define ff_ENAMETOOLONG 63 /* File name too long */ 104 105 /* should be rearranged */ 106 #define ff_EHOSTDOWN 64 /* Host is down */ 107 #define ff_EHOSTUNREACH 65 /* No route to host */ 108 #define ff_ENOTEMPTY 66 /* Directory not empty */ 109 110 /* quotas & mush */ 111 #define ff_EPROCLIM 67 /* Too many processes */ 112 #define ff_EUSERS 68 /* Too many users */ 113 #define ff_EDQUOT 69 /* Disc quota exceeded */ 114 115 #define ff_ESTALE 70 /* Stale NFS file handle */ 116 #define ff_EREMOTE 71 /* Too many levels of remote in path */ 117 #define ff_EBADRPC 72 /* RPC struct is bad */ 118 #define ff_ERPCMISMATCH 73 /* RPC version wrong */ 119 #define ff_EPROGUNAVAIL 74 /* RPC prog. not avail */ 120 #define ff_EPROGMISMATCH 75 /* Program version wrong */ 121 #define ff_EPROCUNAVAIL 76 /* Bad procedure for program */ 122 123 #define ff_ENOLCK 77 /* No locks available */ 124 #define ff_ENOSYS 78 /* Function not implemented */ 125 126 #define ff_EFTYPE 79 /* Inappropriate file type or format */ 127 #define ff_EAUTH 80 /* Authentication error */ 128 #define ff_ENEEDAUTH 81 /* Need authenticator */ 129 #define ff_EIDRM 82 /* Identifier removed */ 130 #define ff_ENOMSG 83 /* No message of desired type */ 131 #define ff_EOVERFLOW 84 /* Value too large to be stored in data type */ 132 #define ff_ECANCELED 85 /* Operation canceled */ 133 #define ff_EILSEQ 86 /* Illegal byte sequence */ 134 #define ff_ENOATTR 87 /* Attribute not found */ 135 136 #define ff_EDOOFUS 88 /* Programming error */ 137 138 #define ff_EBADMSG 89 /* Bad message */ 139 #define ff_EMULTIHOP 90 /* Multihop attempted */ 140 #define ff_ENOLINK 91 /* Link has been severed */ 141 #define ff_EPROTO 92 /* Protocol error */ 142 143 #define ff_ENOTCAPABLE 93 /* Capabilities insufficient */ 144 #define ff_ECAPMODE 94 /* Not permitted in capability mode */ 145 #define ff_ENOTRECOVERABLE 95 /* State not recoverable */ 146 #define ff_EOWNERDEAD 96 /* Previous owner died */ 147 148 #endif 149 150