1/* 2 * Copyright (C) 2008 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/* the following corresponds to the error codes of the Linux kernel used by the Android platform 30 * these are distinct from the OpenBSD ones, which is why we need to redeclare them here 31 * 32 * this file may be included several times to define either error constants or their 33 * string representation 34 */ 35 36#ifndef __BIONIC_ERRDEF 37#error "__BIONIC_ERRDEF must be defined before including this file" 38#endif 39__BIONIC_ERRDEF( 0 , 0, "Success" ) 40__BIONIC_ERRDEF( EPERM , 1, "Operation not permitted" ) 41__BIONIC_ERRDEF( ENOENT , 2, "No such file or directory" ) 42__BIONIC_ERRDEF( ESRCH , 3, "No such process" ) 43__BIONIC_ERRDEF( EINTR , 4, "Interrupted system call" ) 44__BIONIC_ERRDEF( EIO , 5, "I/O error" ) 45__BIONIC_ERRDEF( ENXIO , 6, "No such device or address" ) 46__BIONIC_ERRDEF( E2BIG , 7, "Argument list too long" ) 47__BIONIC_ERRDEF( ENOEXEC , 8, "Exec format error" ) 48__BIONIC_ERRDEF( EBADF , 9, "Bad file descriptor" ) 49__BIONIC_ERRDEF( ECHILD , 10, "No child processes" ) 50__BIONIC_ERRDEF( EAGAIN , 11, "Try again" ) 51__BIONIC_ERRDEF( ENOMEM , 12, "Out of memory" ) 52__BIONIC_ERRDEF( EACCES , 13, "Permission denied" ) 53__BIONIC_ERRDEF( EFAULT , 14, "Bad address" ) 54__BIONIC_ERRDEF( ENOTBLK , 15, "Block device required" ) 55__BIONIC_ERRDEF( EBUSY , 16, "Device or resource busy" ) 56__BIONIC_ERRDEF( EEXIST , 17, "File exists" ) 57__BIONIC_ERRDEF( EXDEV , 18, "Cross-device link" ) 58__BIONIC_ERRDEF( ENODEV , 19, "No such device" ) 59__BIONIC_ERRDEF( ENOTDIR , 20, "Not a directory" ) 60__BIONIC_ERRDEF( EISDIR , 21, "Is a directory" ) 61__BIONIC_ERRDEF( EINVAL , 22, "Invalid argument" ) 62__BIONIC_ERRDEF( ENFILE , 23, "File table overflow" ) 63__BIONIC_ERRDEF( EMFILE , 24, "Too many open files" ) 64__BIONIC_ERRDEF( ENOTTY , 25, "Not a typewriter" ) 65__BIONIC_ERRDEF( ETXTBSY , 26, "Text file busy" ) 66__BIONIC_ERRDEF( EFBIG , 27, "File too large" ) 67__BIONIC_ERRDEF( ENOSPC , 28, "No space left on device" ) 68__BIONIC_ERRDEF( ESPIPE , 29, "Illegal seek" ) 69__BIONIC_ERRDEF( EROFS , 30, "Read-only file system" ) 70__BIONIC_ERRDEF( EMLINK , 31, "Too many links" ) 71__BIONIC_ERRDEF( EPIPE , 32, "Broken pipe" ) 72__BIONIC_ERRDEF( EDOM , 33, "Math argument out of domain of func" ) 73__BIONIC_ERRDEF( ERANGE , 34, "Math result not representable" ) 74__BIONIC_ERRDEF( EDEADLK , 35, "Resource deadlock would occur" ) 75__BIONIC_ERRDEF( ENAMETOOLONG , 36, "File name too long" ) 76__BIONIC_ERRDEF( ENOLCK , 37, "No record locks available" ) 77__BIONIC_ERRDEF( ENOSYS , 38, "Function not implemented" ) 78__BIONIC_ERRDEF( ENOTEMPTY , 39, "Directory not empty" ) 79__BIONIC_ERRDEF( ELOOP , 40, "Too many symbolic links encountered" ) 80__BIONIC_ERRDEF( ENOMSG , 42, "No message of desired type" ) 81__BIONIC_ERRDEF( EIDRM , 43, "Identifier removed" ) 82__BIONIC_ERRDEF( ECHRNG , 44, "Channel number out of range" ) 83__BIONIC_ERRDEF( EL2NSYNC , 45, "Level 2 not synchronized" ) 84__BIONIC_ERRDEF( EL3HLT , 46, "Level 3 halted" ) 85__BIONIC_ERRDEF( EL3RST , 47, "Level 3 reset" ) 86__BIONIC_ERRDEF( ELNRNG , 48, "Link number out of range" ) 87__BIONIC_ERRDEF( EUNATCH , 49, "Protocol driver not attached" ) 88__BIONIC_ERRDEF( ENOCSI , 50, "No CSI structure available" ) 89__BIONIC_ERRDEF( EL2HLT , 51, "Level 2 halted" ) 90__BIONIC_ERRDEF( EBADE , 52, "Invalid exchange" ) 91__BIONIC_ERRDEF( EBADR , 53, "Invalid request descriptor" ) 92__BIONIC_ERRDEF( EXFULL , 54, "Exchange full" ) 93__BIONIC_ERRDEF( ENOANO , 55, "No anode" ) 94__BIONIC_ERRDEF( EBADRQC , 56, "Invalid request code" ) 95__BIONIC_ERRDEF( EBADSLT , 57, "Invalid slot" ) 96__BIONIC_ERRDEF( EBFONT , 59, "Bad font file format" ) 97__BIONIC_ERRDEF( ENOSTR , 60, "Device not a stream" ) 98__BIONIC_ERRDEF( ENODATA , 61, "No data available" ) 99__BIONIC_ERRDEF( ETIME , 62, "Timer expired" ) 100__BIONIC_ERRDEF( ENOSR , 63, "Out of streams resources" ) 101__BIONIC_ERRDEF( ENONET , 64, "Machine is not on the network" ) 102__BIONIC_ERRDEF( ENOPKG , 65, "Package not installed" ) 103__BIONIC_ERRDEF( EREMOTE , 66, "Object is remote" ) 104__BIONIC_ERRDEF( ENOLINK , 67, "Link has been severed" ) 105__BIONIC_ERRDEF( EADV , 68, "Advertise error" ) 106__BIONIC_ERRDEF( ESRMNT , 69, "Srmount error" ) 107__BIONIC_ERRDEF( ECOMM , 70, "Communication error on send" ) 108__BIONIC_ERRDEF( EPROTO , 71, "Protocol error" ) 109__BIONIC_ERRDEF( EMULTIHOP , 72, "Multihop attempted" ) 110__BIONIC_ERRDEF( EDOTDOT , 73, "RFS specific error" ) 111__BIONIC_ERRDEF( EBADMSG , 74, "Not a data message" ) 112__BIONIC_ERRDEF( EOVERFLOW , 75, "Value too large for defined data type" ) 113__BIONIC_ERRDEF( ENOTUNIQ , 76, "Name not unique on network" ) 114__BIONIC_ERRDEF( EBADFD , 77, "File descriptor in bad state" ) 115__BIONIC_ERRDEF( EREMCHG , 78, "Remote address changed" ) 116__BIONIC_ERRDEF( ELIBACC , 79, "Can not access a needed shared library" ) 117__BIONIC_ERRDEF( ELIBBAD , 80, "Accessing a corrupted shared library" ) 118__BIONIC_ERRDEF( ELIBSCN , 81, ".lib section in a.out corrupted" ) 119__BIONIC_ERRDEF( ELIBMAX , 82, "Attempting to link in too many shared libraries" ) 120__BIONIC_ERRDEF( ELIBEXEC , 83, "Cannot exec a shared library directly" ) 121__BIONIC_ERRDEF( EILSEQ , 84, "Illegal byte sequence" ) 122__BIONIC_ERRDEF( ERESTART , 85, "Interrupted system call should be restarted" ) 123__BIONIC_ERRDEF( ESTRPIPE , 86, "Streams pipe error" ) 124__BIONIC_ERRDEF( EUSERS , 87, "Too many users" ) 125__BIONIC_ERRDEF( ENOTSOCK , 88, "Socket operation on non-socket" ) 126__BIONIC_ERRDEF( EDESTADDRREQ , 89, "Destination address required" ) 127__BIONIC_ERRDEF( EMSGSIZE , 90, "Message too long" ) 128__BIONIC_ERRDEF( EPROTOTYPE , 91, "Protocol wrong type for socket" ) 129__BIONIC_ERRDEF( ENOPROTOOPT , 92, "Protocol not available" ) 130__BIONIC_ERRDEF( EPROTONOSUPPORT, 93, "Protocol not supported" ) 131__BIONIC_ERRDEF( ESOCKTNOSUPPORT, 94, "Socket type not supported" ) 132__BIONIC_ERRDEF( EOPNOTSUPP , 95, "Operation not supported on transport endpoint" ) 133__BIONIC_ERRDEF( EPFNOSUPPORT , 96, "Protocol family not supported" ) 134__BIONIC_ERRDEF( EAFNOSUPPORT , 97, "Address family not supported by protocol" ) 135__BIONIC_ERRDEF( EADDRINUSE , 98, "Address already in use" ) 136__BIONIC_ERRDEF( EADDRNOTAVAIL , 99, "Cannot assign requested address" ) 137__BIONIC_ERRDEF( ENETDOWN , 100, "Network is down" ) 138__BIONIC_ERRDEF( ENETUNREACH , 101, "Network is unreachable" ) 139__BIONIC_ERRDEF( ENETRESET , 102, "Network dropped connection because of reset" ) 140__BIONIC_ERRDEF( ECONNABORTED , 103, "Software caused connection abort" ) 141__BIONIC_ERRDEF( ECONNRESET , 104, "Connection reset by peer" ) 142__BIONIC_ERRDEF( ENOBUFS , 105, "No buffer space available" ) 143__BIONIC_ERRDEF( EISCONN , 106, "Transport endpoint is already connected" ) 144__BIONIC_ERRDEF( ENOTCONN , 107, "Transport endpoint is not connected" ) 145__BIONIC_ERRDEF( ESHUTDOWN , 108, "Cannot send after transport endpoint shutdown" ) 146__BIONIC_ERRDEF( ETOOMANYREFS , 109, "Too many references: cannot splice" ) 147__BIONIC_ERRDEF( ETIMEDOUT , 110, "Connection timed out" ) 148__BIONIC_ERRDEF( ECONNREFUSED , 111, "Connection refused" ) 149__BIONIC_ERRDEF( EHOSTDOWN , 112, "Host is down" ) 150__BIONIC_ERRDEF( EHOSTUNREACH , 113, "No route to host" ) 151__BIONIC_ERRDEF( EALREADY , 114, "Operation already in progress" ) 152__BIONIC_ERRDEF( EINPROGRESS , 115, "Operation now in progress" ) 153__BIONIC_ERRDEF( ESTALE , 116, "Stale NFS file handle" ) 154__BIONIC_ERRDEF( EUCLEAN , 117, "Structure needs cleaning" ) 155__BIONIC_ERRDEF( ENOTNAM , 118, "Not a XENIX named type file" ) 156__BIONIC_ERRDEF( ENAVAIL , 119, "No XENIX semaphores available" ) 157__BIONIC_ERRDEF( EISNAM , 120, "Is a named type file" ) 158__BIONIC_ERRDEF( EREMOTEIO , 121, "Remote I/O error" ) 159__BIONIC_ERRDEF( EDQUOT , 122, "Quota exceeded" ) 160__BIONIC_ERRDEF( ENOMEDIUM , 123, "No medium found" ) 161__BIONIC_ERRDEF( EMEDIUMTYPE , 124, "Wrong medium type" ) 162__BIONIC_ERRDEF( ECANCELED , 125, "Operation Canceled" ) 163__BIONIC_ERRDEF( ENOKEY , 126, "Required key not available" ) 164__BIONIC_ERRDEF( EKEYEXPIRED , 127, "Key has expired" ) 165__BIONIC_ERRDEF( EKEYREVOKED , 128, "Key has been revoked" ) 166__BIONIC_ERRDEF( EKEYREJECTED , 129, "Key was rejected by service" ) 167__BIONIC_ERRDEF( EOWNERDEAD , 130, "Owner died" ) 168__BIONIC_ERRDEF( ENOTRECOVERABLE, 131, "State not recoverable" ) 169 170#undef __BIONIC_ERRDEF 171