| Elliott Hughes | 2109f12 | 2023-09-21 18:32:39 -0700 | [diff] [blame] | 1 | /* | 
 | 2 |  * Copyright (C) 2023 The Android Open Source Project | 
 | 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 | 
 | 7 |  * are met: | 
 | 8 |  *  * Redistributions of source code must retain the above copyright | 
 | 9 |  *    notice, this list of conditions and the following disclaimer. | 
 | 10 |  *  * Redistributions in binary form must reproduce the above copyright | 
 | 11 |  *    notice, this list of conditions and the following disclaimer in | 
 | 12 |  *    the documentation and/or other materials provided with the | 
 | 13 |  *    distribution. | 
 | 14 |  * | 
 | 15 |  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 
 | 16 |  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | 
 | 17 |  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 
 | 18 |  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | 
 | 19 |  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | 
 | 20 |  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | 
 | 21 |  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS | 
 | 22 |  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | 
 | 23 |  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | 
 | 24 |  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | 
 | 25 |  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 
 | 26 |  * SUCH DAMAGE. | 
 | 27 |  */ | 
 | 28 |  | 
 | 29 | /* | 
 | 30 |  * This header is used to define error constants and names; | 
 | 31 |  * it might be included several times. | 
 | 32 |  */ | 
 | 33 |  | 
 | 34 | #ifndef __BIONIC_ERRDEF | 
 | 35 | #error __BIONIC_ERRDEF not defined | 
 | 36 | #endif | 
 | 37 |  | 
 | 38 | __BIONIC_ERRDEF(0, "Success") | 
 | 39 | __BIONIC_ERRDEF(EPERM, "Operation not permitted") | 
 | 40 | __BIONIC_ERRDEF(ENOENT, "No such file or directory") | 
 | 41 | __BIONIC_ERRDEF(ESRCH, "No such process") | 
 | 42 | __BIONIC_ERRDEF(EINTR, "Interrupted system call") | 
 | 43 | __BIONIC_ERRDEF(EIO, "I/O error") | 
 | 44 | __BIONIC_ERRDEF(ENXIO, "No such device or address") | 
 | 45 | __BIONIC_ERRDEF(E2BIG, "Argument list too long") | 
 | 46 | __BIONIC_ERRDEF(ENOEXEC, "Exec format error") | 
 | 47 | __BIONIC_ERRDEF(EBADF, "Bad file descriptor") | 
 | 48 | __BIONIC_ERRDEF(ECHILD, "No child processes") | 
 | 49 | __BIONIC_ERRDEF(EAGAIN, "Try again") | 
 | 50 | __BIONIC_ERRDEF(ENOMEM, "Out of memory") | 
 | 51 | __BIONIC_ERRDEF(EACCES, "Permission denied") | 
 | 52 | __BIONIC_ERRDEF(EFAULT, "Bad address") | 
 | 53 | __BIONIC_ERRDEF(ENOTBLK, "Block device required") | 
 | 54 | __BIONIC_ERRDEF(EBUSY, "Device or resource busy") | 
 | 55 | __BIONIC_ERRDEF(EEXIST, "File exists") | 
 | 56 | __BIONIC_ERRDEF(EXDEV, "Cross-device link") | 
 | 57 | __BIONIC_ERRDEF(ENODEV, "No such device") | 
 | 58 | __BIONIC_ERRDEF(ENOTDIR, "Not a directory") | 
 | 59 | __BIONIC_ERRDEF(EISDIR, "Is a directory") | 
 | 60 | __BIONIC_ERRDEF(EINVAL, "Invalid argument") | 
 | 61 | __BIONIC_ERRDEF(ENFILE, "File table overflow") | 
 | 62 | __BIONIC_ERRDEF(EMFILE, "Too many open files") | 
 | 63 | __BIONIC_ERRDEF(ENOTTY, "Inappropriate ioctl for device") | 
 | 64 | __BIONIC_ERRDEF(ETXTBSY, "Text file busy") | 
 | 65 | __BIONIC_ERRDEF(EFBIG, "File too large") | 
 | 66 | __BIONIC_ERRDEF(ENOSPC, "No space left on device") | 
 | 67 | __BIONIC_ERRDEF(ESPIPE, "Illegal seek") | 
 | 68 | __BIONIC_ERRDEF(EROFS, "Read-only file system") | 
 | 69 | __BIONIC_ERRDEF(EMLINK, "Too many links") | 
 | 70 | __BIONIC_ERRDEF(EPIPE, "Broken pipe") | 
 | 71 | __BIONIC_ERRDEF(EDOM, "Math argument out of domain of func") | 
 | 72 | __BIONIC_ERRDEF(ERANGE, "Math result not representable") | 
 | 73 | __BIONIC_ERRDEF(EDEADLK, "Resource deadlock would occur") | 
 | 74 | __BIONIC_ERRDEF(ENAMETOOLONG, "File name too long") | 
 | 75 | __BIONIC_ERRDEF(ENOLCK, "No record locks available") | 
 | 76 | __BIONIC_ERRDEF(ENOSYS, "Function not implemented") | 
 | 77 | __BIONIC_ERRDEF(ENOTEMPTY, "Directory not empty") | 
 | 78 | __BIONIC_ERRDEF(ELOOP, "Too many symbolic links encountered") | 
 | 79 | __BIONIC_ERRDEF(ENOMSG, "No message of desired type") | 
 | 80 | __BIONIC_ERRDEF(EIDRM, "Identifier removed") | 
 | 81 | __BIONIC_ERRDEF(ECHRNG, "Channel number out of range") | 
 | 82 | __BIONIC_ERRDEF(EL2NSYNC, "Level 2 not synchronized") | 
 | 83 | __BIONIC_ERRDEF(EL3HLT, "Level 3 halted") | 
 | 84 | __BIONIC_ERRDEF(EL3RST, "Level 3 reset") | 
 | 85 | __BIONIC_ERRDEF(ELNRNG, "Link number out of range") | 
 | 86 | __BIONIC_ERRDEF(EUNATCH, "Protocol driver not attached") | 
 | 87 | __BIONIC_ERRDEF(ENOCSI, "No CSI structure available") | 
 | 88 | __BIONIC_ERRDEF(EL2HLT, "Level 2 halted") | 
 | 89 | __BIONIC_ERRDEF(EBADE, "Invalid exchange") | 
 | 90 | __BIONIC_ERRDEF(EBADR, "Invalid request descriptor") | 
 | 91 | __BIONIC_ERRDEF(EXFULL, "Exchange full") | 
 | 92 | __BIONIC_ERRDEF(ENOANO, "No anode") | 
 | 93 | __BIONIC_ERRDEF(EBADRQC, "Invalid request code") | 
 | 94 | __BIONIC_ERRDEF(EBADSLT, "Invalid slot") | 
 | 95 | __BIONIC_ERRDEF(EBFONT, "Bad font file format") | 
 | 96 | __BIONIC_ERRDEF(ENOSTR, "Device not a stream") | 
 | 97 | __BIONIC_ERRDEF(ENODATA, "No data available") | 
 | 98 | __BIONIC_ERRDEF(ETIME, "Timer expired") | 
 | 99 | __BIONIC_ERRDEF(ENOSR, "Out of streams resources") | 
 | 100 | __BIONIC_ERRDEF(ENONET, "Machine is not on the network") | 
 | 101 | __BIONIC_ERRDEF(ENOPKG, "Package not installed") | 
 | 102 | __BIONIC_ERRDEF(EREMOTE, "Object is remote") | 
 | 103 | __BIONIC_ERRDEF(ENOLINK, "Link has been severed") | 
 | 104 | __BIONIC_ERRDEF(EADV, "Advertise error") | 
 | 105 | __BIONIC_ERRDEF(ESRMNT, "Srmount error") | 
 | 106 | __BIONIC_ERRDEF(ECOMM, "Communication error on send") | 
 | 107 | __BIONIC_ERRDEF(EPROTO, "Protocol error") | 
 | 108 | __BIONIC_ERRDEF(EMULTIHOP, "Multihop attempted") | 
 | 109 | __BIONIC_ERRDEF(EDOTDOT, "RFS specific error") | 
 | 110 | __BIONIC_ERRDEF(EBADMSG, "Not a data message") | 
 | 111 | __BIONIC_ERRDEF(EOVERFLOW, "Value too large for defined data type") | 
 | 112 | __BIONIC_ERRDEF(ENOTUNIQ, "Name not unique on network") | 
 | 113 | __BIONIC_ERRDEF(EBADFD, "File descriptor in bad state") | 
 | 114 | __BIONIC_ERRDEF(EREMCHG, "Remote address changed") | 
 | 115 | __BIONIC_ERRDEF(ELIBACC, "Can not access a needed shared library") | 
 | 116 | __BIONIC_ERRDEF(ELIBBAD, "Accessing a corrupted shared library") | 
 | 117 | __BIONIC_ERRDEF(ELIBSCN, ".lib section in a.out corrupted") | 
 | 118 | __BIONIC_ERRDEF(ELIBMAX, "Attempting to link in too many shared libraries") | 
 | 119 | __BIONIC_ERRDEF(ELIBEXEC, "Cannot exec a shared library directly") | 
 | 120 | __BIONIC_ERRDEF(EILSEQ, "Illegal byte sequence") | 
 | 121 | __BIONIC_ERRDEF(ERESTART, "Interrupted system call should be restarted") | 
 | 122 | __BIONIC_ERRDEF(ESTRPIPE, "Streams pipe error") | 
 | 123 | __BIONIC_ERRDEF(EUSERS, "Too many users") | 
 | 124 | __BIONIC_ERRDEF(ENOTSOCK, "Socket operation on non-socket") | 
 | 125 | __BIONIC_ERRDEF(EDESTADDRREQ, "Destination address required") | 
 | 126 | __BIONIC_ERRDEF(EMSGSIZE, "Message too long") | 
 | 127 | __BIONIC_ERRDEF(EPROTOTYPE, "Protocol wrong type for socket") | 
 | 128 | __BIONIC_ERRDEF(ENOPROTOOPT, "Protocol not available") | 
 | 129 | __BIONIC_ERRDEF(EPROTONOSUPPORT, "Protocol not supported") | 
 | 130 | __BIONIC_ERRDEF(ESOCKTNOSUPPORT, "Socket type not supported") | 
 | 131 | __BIONIC_ERRDEF(EOPNOTSUPP, "Operation not supported on transport endpoint") | 
 | 132 | __BIONIC_ERRDEF(EPFNOSUPPORT, "Protocol family not supported") | 
 | 133 | __BIONIC_ERRDEF(EAFNOSUPPORT, "Address family not supported by protocol") | 
 | 134 | __BIONIC_ERRDEF(EADDRINUSE, "Address already in use") | 
 | 135 | __BIONIC_ERRDEF(EADDRNOTAVAIL, "Cannot assign requested address") | 
 | 136 | __BIONIC_ERRDEF(ENETDOWN, "Network is down") | 
 | 137 | __BIONIC_ERRDEF(ENETUNREACH, "Network is unreachable") | 
 | 138 | __BIONIC_ERRDEF(ENETRESET, "Network dropped connection because of reset") | 
 | 139 | __BIONIC_ERRDEF(ECONNABORTED, "Software caused connection abort") | 
 | 140 | __BIONIC_ERRDEF(ECONNRESET, "Connection reset by peer") | 
 | 141 | __BIONIC_ERRDEF(ENOBUFS, "No buffer space available") | 
 | 142 | __BIONIC_ERRDEF(EISCONN, "Transport endpoint is already connected") | 
 | 143 | __BIONIC_ERRDEF(ENOTCONN, "Transport endpoint is not connected") | 
 | 144 | __BIONIC_ERRDEF(ESHUTDOWN, "Cannot send after transport endpoint shutdown") | 
 | 145 | __BIONIC_ERRDEF(ETOOMANYREFS, "Too many references: cannot splice") | 
 | 146 | __BIONIC_ERRDEF(ETIMEDOUT, "Connection timed out") | 
 | 147 | __BIONIC_ERRDEF(ECONNREFUSED, "Connection refused") | 
 | 148 | __BIONIC_ERRDEF(EHOSTDOWN, "Host is down") | 
 | 149 | __BIONIC_ERRDEF(EHOSTUNREACH, "No route to host") | 
 | 150 | __BIONIC_ERRDEF(EALREADY, "Operation already in progress") | 
 | 151 | __BIONIC_ERRDEF(EINPROGRESS, "Operation now in progress") | 
 | 152 | __BIONIC_ERRDEF(ESTALE, "Stale NFS file handle") | 
 | 153 | __BIONIC_ERRDEF(EUCLEAN, "Structure needs cleaning") | 
 | 154 | __BIONIC_ERRDEF(ENOTNAM, "Not a XENIX named type file") | 
 | 155 | __BIONIC_ERRDEF(ENAVAIL, "No XENIX semaphores available") | 
 | 156 | __BIONIC_ERRDEF(EISNAM, "Is a named type file") | 
 | 157 | __BIONIC_ERRDEF(EREMOTEIO, "Remote I/O error") | 
 | 158 | __BIONIC_ERRDEF(EDQUOT, "Quota exceeded") | 
 | 159 | __BIONIC_ERRDEF(ENOMEDIUM, "No medium found") | 
 | 160 | __BIONIC_ERRDEF(EMEDIUMTYPE, "Wrong medium type") | 
 | 161 | __BIONIC_ERRDEF(ECANCELED, "Operation Canceled") | 
 | 162 | __BIONIC_ERRDEF(ENOKEY, "Required key not available") | 
 | 163 | __BIONIC_ERRDEF(EKEYEXPIRED, "Key has expired") | 
 | 164 | __BIONIC_ERRDEF(EKEYREVOKED, "Key has been revoked") | 
 | 165 | __BIONIC_ERRDEF(EKEYREJECTED, "Key was rejected by service") | 
 | 166 | __BIONIC_ERRDEF(EOWNERDEAD, "Owner died") | 
 | 167 | __BIONIC_ERRDEF(ENOTRECOVERABLE, "State not recoverable") | 
 | 168 | __BIONIC_ERRDEF(ERFKILL, "Operation not possible due to RF-kill") | 
 | 169 | __BIONIC_ERRDEF(EHWPOISON, "Memory page has hardware error") | 
 | 170 |  | 
 | 171 | #undef __BIONIC_ERRDEF |