xref: /freebsd/sys/compat/linux/linux_errno.h (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1 /*-
2  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3  *
4  * Copyright (c) 2020 The FreeBSD Foundation
5  *
6  * This software was developed by Edward Tomasz Napierala under sponsorship
7  * from the FreeBSD Foundation.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  * 2. Redistributions in binary form must reproduce the above copyright
15  *    notice, this list of conditions and the following disclaimer in the
16  *    documentation and/or other materials provided with the distribution.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28  * SUCH DAMAGE.
29  *
30  * $FreeBSD$
31  */
32 
33 #ifndef _LINUX_ERRNO_H_
34 #define _LINUX_ERRNO_H_
35 
36 #define	LINUX_EPERM		1
37 #define	LINUX_ENOENT		2
38 #define	LINUX_ESRCH		3
39 #define	LINUX_EINTR		4
40 #define	LINUX_EIO		5
41 #define	LINUX_ENXIO		6
42 #define	LINUX_E2BIG		7
43 #define	LINUX_ENOEXEC		8
44 #define	LINUX_EBADF		9
45 
46 #define	LINUX_ECHILD		10
47 #define	LINUX_EAGAIN		11
48 #define	LINUX_ENOMEM		12
49 #define	LINUX_EACCES		13
50 #define	LINUX_EFAULT		14
51 #define	LINUX_ENOTBLK		15
52 #define	LINUX_EBUSY		16
53 #define	LINUX_EEXIST		17
54 #define	LINUX_EXDEV		18
55 #define	LINUX_ENODEV		19
56 
57 #define	LINUX_ENOTDIR		20
58 #define	LINUX_EISDIR		21
59 #define	LINUX_EINVAL		22
60 #define	LINUX_ENFILE		23
61 #define	LINUX_EMFILE		24
62 #define	LINUX_ENOTTY		25
63 #define	LINUX_ETXTBSY		26
64 #define	LINUX_EFBIG		27
65 #define	LINUX_ENOSPC		28
66 #define	LINUX_ESPIPE		29
67 
68 #define	LINUX_EROFS		30
69 #define	LINUX_EMLINK		31
70 #define	LINUX_EPIPE		32
71 #define	LINUX_EDOM		33
72 #define	LINUX_ERANGE		34
73 #define	LINUX_EDEADLK		35
74 #define	LINUX_ENAMETOOLONG	36
75 #define	LINUX_ENOLCK		37
76 #define	LINUX_ENOSYS		38
77 #define	LINUX_ENOTEMPTY		39
78 
79 #define	LINUX_ELOOP		40
80 /* XXX: errno 41 is not defined in Linux. */
81 #define	LINUX_ENOMSG		42
82 #define	LINUX_EIDRM		43
83 #define	LINUX_ECHRNG		44
84 #define	LINUX_EL2NSYNC		45
85 #define	LINUX_EL3HLT		46
86 #define	LINUX_EL3RST		47
87 #define	LINUX_ELNRNG		48
88 #define	LINUX_EUNATCH		49
89 
90 #define	LINUX_ENOCSI		50
91 #define	LINUX_EL2HLT		51
92 #define	LINUX_EBADE		52
93 #define	LINUX_EBADR		53
94 #define	LINUX_EXFULL		54
95 #define	LINUX_ENOANO		55
96 #define	LINUX_EBADRQC		56
97 #define	LINUX_EBADSLT		57
98 /* XXX: errno 58 is not defined in Linux. */
99 #define	LINUX_EBFONT		59
100 
101 #define	LINUX_ENOSTR		60
102 #define	LINUX_ENODATA		61
103 #define	LINUX_ENOTIME		62
104 #define	LINUX_ENOSR		63
105 #define	LINUX_ENONET		64
106 #define	LINUX_ENOPKG		65
107 #define	LINUX_EREMOTE		66
108 #define	LINUX_ENOLINK		67
109 #define	LINUX_EADV		68
110 #define	LINUX_ESRMNT		69
111 
112 #define	LINUX_ECOMM		70
113 #define	LINUX_EPROTO		71
114 #define	LINUX_EMULTIHOP		72
115 #define	LINUX_EDOTDOT		73
116 #define	LINUX_EBADMSG		74
117 #define	LINUX_EOVERFLOW		75
118 #define	LINUX_ENOTUNIQ		76
119 #define	LINUX_EBADFD		77
120 #define	LINUX_EREMCHG		78
121 #define	LINUX_ELIBACC		79
122 
123 #define	LINUX_ELIBBAD		80
124 #define	LINUX_ELIBSCN		81
125 #define	LINUX_ELIBMAX		82
126 #define	LINUX_ELIBEXEC		83
127 #define	LINUX_EILSEQ		84
128 #define	LINUX_ERESTART		85
129 #define	LINUX_ESTRPIPE		86
130 #define	LINUX_EUSERS		87
131 #define	LINUX_ENOTSOCK		88
132 #define	LINUX_EDESTADDRREQ	89
133 
134 #define	LINUX_EMSGSIZE		90
135 #define	LINUX_EPROTOTYPE	91
136 #define	LINUX_ENOPROTOOPT	92
137 #define	LINUX_EPROTONOTSUPPORT	93
138 #define	LINUX_ESOCKNOTSUPPORT	94
139 #define	LINUX_EOPNOTSUPPORT	95
140 #define	LINUX_EPFNOTSUPPORT	96
141 #define	LINUX_EAFNOTSUPPORT	97
142 #define	LINUX_EADDRINUSE	98
143 #define	LINUX_EADDRNOTAVAIL	99
144 
145 #define	LINUX_ENETDOWN		100
146 #define	LINUX_ENETUNREACH	101
147 #define	LINUX_ENETRESET		102
148 #define	LINUX_ECONNABORTED	103
149 #define	LINUX_ECONNRESET	104
150 #define	LINUX_ENOBUFS		105
151 #define	LINUX_EISCONN		106
152 #define	LINUX_ENOTCONN		107
153 #define	LINUX_ESHUTDOWN		108
154 #define	LINUX_ETOOMANYREFS	109
155 
156 #define	LINUX_ETIMEDOUT		110
157 #define	LINUX_ECONNREFUSED	111
158 #define	LINUX_EHOSTDOWN		112
159 #define	LINUX_EHOSTUNREACH	113
160 #define	LINUX_EALREADY		114
161 #define	LINUX_EINPROGRESS	115
162 #define	LINUX_ESTALE		116
163 #define	LINUX_EUCLEAN		117
164 #define	LINUX_ENOTNAM		118
165 #define	LINUX_ENAVAIL		119
166 
167 #define	LINUX_EISNAM		120
168 #define	LINUX_EREMOTEIO		121
169 #define	LINUX_EDQUOT		122
170 #define	LINUX_ENOMEDIUM		123
171 #define	LINUX_EMEDIUMTYPE	124
172 #define	LINUX_ECANCELED		125
173 #define	LINUX_ENOKEY		126
174 #define	LINUX_EKEYEXPIRED	127
175 #define	LINUX_EKEYREVOKED	128
176 #define	LINUX_EKEYREJECTED	129
177 
178 #define	LINUX_EOWNERDEAD	130
179 #define	LINUX_ENOTRECOVERABLE	131
180 #define	LINUX_ERFKILL		132
181 #define	LINUX_EHWPOISON		133
182 
183 #define	LINUX_ELAST		LINUX_EHWPOISON
184 
185 #endif /* _LINUX_ERRNO_H_ */
186