blob: 435d49bc3091b9f83caaec5040cd4256be33aafc [file] [log] [blame]
Elliott Hughes2109f122023-09-21 18:32:39 -07001/*
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