xref: /aosp_15_r20/external/arm-trusted-firmware/include/lib/libc/errno.h (revision 54fd6939e177f8ff529b10183254802c76df6d08)
1*54fd6939SJiyong Park /*-
2*54fd6939SJiyong Park  * SPDX-License-Identifier: BSD-3-Clause
3*54fd6939SJiyong Park  *
4*54fd6939SJiyong Park  * Copyright (c) 1982, 1986, 1989, 1993
5*54fd6939SJiyong Park  *	The Regents of the University of California.  All rights reserved.
6*54fd6939SJiyong Park  * (c) UNIX System Laboratories, Inc.
7*54fd6939SJiyong Park  * All or some portions of this file are derived from material licensed
8*54fd6939SJiyong Park  * to the University of California by American Telephone and Telegraph
9*54fd6939SJiyong Park  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
10*54fd6939SJiyong Park  * the permission of UNIX System Laboratories, Inc.
11*54fd6939SJiyong Park  *
12*54fd6939SJiyong Park  * Redistribution and use in source and binary forms, with or without
13*54fd6939SJiyong Park  * modification, are permitted provided that the following conditions
14*54fd6939SJiyong Park  * are met:
15*54fd6939SJiyong Park  * 1. Redistributions of source code must retain the above copyright
16*54fd6939SJiyong Park  *    notice, this list of conditions and the following disclaimer.
17*54fd6939SJiyong Park  * 2. Redistributions in binary form must reproduce the above copyright
18*54fd6939SJiyong Park  *    notice, this list of conditions and the following disclaimer in the
19*54fd6939SJiyong Park  *    documentation and/or other materials provided with the distribution.
20*54fd6939SJiyong Park  * 3. Neither the name of the University nor the names of its contributors
21*54fd6939SJiyong Park  *    may be used to endorse or promote products derived from this software
22*54fd6939SJiyong Park  *    without specific prior written permission.
23*54fd6939SJiyong Park  *
24*54fd6939SJiyong Park  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25*54fd6939SJiyong Park  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26*54fd6939SJiyong Park  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27*54fd6939SJiyong Park  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28*54fd6939SJiyong Park  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29*54fd6939SJiyong Park  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30*54fd6939SJiyong Park  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31*54fd6939SJiyong Park  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32*54fd6939SJiyong Park  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33*54fd6939SJiyong Park  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34*54fd6939SJiyong Park  * SUCH DAMAGE.
35*54fd6939SJiyong Park  *
36*54fd6939SJiyong Park  *	@(#)errno.h	8.5 (Berkeley) 1/21/94
37*54fd6939SJiyong Park  * $FreeBSD$
38*54fd6939SJiyong Park  */
39*54fd6939SJiyong Park /*
40*54fd6939SJiyong Park  * Portions copyright (c) 2018, ARM Limited and Contributors.
41*54fd6939SJiyong Park  * All rights reserved.
42*54fd6939SJiyong Park  */
43*54fd6939SJiyong Park 
44*54fd6939SJiyong Park #ifndef ERRNO_H
45*54fd6939SJiyong Park #define ERRNO_H
46*54fd6939SJiyong Park 
47*54fd6939SJiyong Park #define	EPERM		1		/* Operation not permitted */
48*54fd6939SJiyong Park #define	ENOENT		2		/* No such file or directory */
49*54fd6939SJiyong Park #define	ESRCH		3		/* No such process */
50*54fd6939SJiyong Park #define	EINTR		4		/* Interrupted system call */
51*54fd6939SJiyong Park #define	EIO		5		/* Input/output error */
52*54fd6939SJiyong Park #define	ENXIO		6		/* Device not configured */
53*54fd6939SJiyong Park #define	E2BIG		7		/* Argument list too long */
54*54fd6939SJiyong Park #define	ENOEXEC		8		/* Exec format error */
55*54fd6939SJiyong Park #define	EBADF		9		/* Bad file descriptor */
56*54fd6939SJiyong Park #define	ECHILD		10		/* No child processes */
57*54fd6939SJiyong Park #define	EDEADLK		11		/* Resource deadlock avoided */
58*54fd6939SJiyong Park 					/* 11 was EAGAIN */
59*54fd6939SJiyong Park #define	ENOMEM		12		/* Cannot allocate memory */
60*54fd6939SJiyong Park #define	EACCES		13		/* Permission denied */
61*54fd6939SJiyong Park #define	EFAULT		14		/* Bad address */
62*54fd6939SJiyong Park #define	ENOTBLK		15		/* Block device required */
63*54fd6939SJiyong Park #define	EBUSY		16		/* Device busy */
64*54fd6939SJiyong Park #define	EEXIST		17		/* File exists */
65*54fd6939SJiyong Park #define	EXDEV		18		/* Cross-device link */
66*54fd6939SJiyong Park #define	ENODEV		19		/* Operation not supported by device */
67*54fd6939SJiyong Park #define	ENOTDIR		20		/* Not a directory */
68*54fd6939SJiyong Park #define	EISDIR		21		/* Is a directory */
69*54fd6939SJiyong Park #define	EINVAL		22		/* Invalid argument */
70*54fd6939SJiyong Park #define	ENFILE		23		/* Too many open files in system */
71*54fd6939SJiyong Park #define	EMFILE		24		/* Too many open files */
72*54fd6939SJiyong Park #define	ENOTTY		25		/* Inappropriate ioctl for device */
73*54fd6939SJiyong Park #define	ETXTBSY		26		/* Text file busy */
74*54fd6939SJiyong Park #define	EFBIG		27		/* File too large */
75*54fd6939SJiyong Park #define	ENOSPC		28		/* No space left on device */
76*54fd6939SJiyong Park #define	ESPIPE		29		/* Illegal seek */
77*54fd6939SJiyong Park #define	EROFS		30		/* Read-only filesystem */
78*54fd6939SJiyong Park #define	EMLINK		31		/* Too many links */
79*54fd6939SJiyong Park #define	EPIPE		32		/* Broken pipe */
80*54fd6939SJiyong Park 
81*54fd6939SJiyong Park /* math software */
82*54fd6939SJiyong Park #define	EDOM		33		/* Numerical argument out of domain */
83*54fd6939SJiyong Park #define	ERANGE		34		/* Result too large */
84*54fd6939SJiyong Park 
85*54fd6939SJiyong Park /* non-blocking and interrupt i/o */
86*54fd6939SJiyong Park #define	EAGAIN		35		/* Resource temporarily unavailable */
87*54fd6939SJiyong Park #define	EWOULDBLOCK	EAGAIN		/* Operation would block */
88*54fd6939SJiyong Park #define	EINPROGRESS	36		/* Operation now in progress */
89*54fd6939SJiyong Park #define	EALREADY	37		/* Operation already in progress */
90*54fd6939SJiyong Park 
91*54fd6939SJiyong Park /* ipc/network software -- argument errors */
92*54fd6939SJiyong Park #define	ENOTSOCK	38		/* Socket operation on non-socket */
93*54fd6939SJiyong Park #define	EDESTADDRREQ	39		/* Destination address required */
94*54fd6939SJiyong Park #define	EMSGSIZE	40		/* Message too long */
95*54fd6939SJiyong Park #define	EPROTOTYPE	41		/* Protocol wrong type for socket */
96*54fd6939SJiyong Park #define	ENOPROTOOPT	42		/* Protocol not available */
97*54fd6939SJiyong Park #define	EPROTONOSUPPORT	43		/* Protocol not supported */
98*54fd6939SJiyong Park #define	ESOCKTNOSUPPORT	44		/* Socket type not supported */
99*54fd6939SJiyong Park #define	EOPNOTSUPP	45		/* Operation not supported */
100*54fd6939SJiyong Park #define	ENOTSUP		EOPNOTSUPP	/* Operation not supported */
101*54fd6939SJiyong Park #define	EPFNOSUPPORT	46		/* Protocol family not supported */
102*54fd6939SJiyong Park #define	EAFNOSUPPORT	47		/* Address family not supported by protocol family */
103*54fd6939SJiyong Park #define	EADDRINUSE	48		/* Address already in use */
104*54fd6939SJiyong Park #define	EADDRNOTAVAIL	49		/* Can't assign requested address */
105*54fd6939SJiyong Park 
106*54fd6939SJiyong Park /* ipc/network software -- operational errors */
107*54fd6939SJiyong Park #define	ENETDOWN	50		/* Network is down */
108*54fd6939SJiyong Park #define	ENETUNREACH	51		/* Network is unreachable */
109*54fd6939SJiyong Park #define	ENETRESET	52		/* Network dropped connection on reset */
110*54fd6939SJiyong Park #define	ECONNABORTED	53		/* Software caused connection abort */
111*54fd6939SJiyong Park #define	ECONNRESET	54		/* Connection reset by peer */
112*54fd6939SJiyong Park #define	ENOBUFS		55		/* No buffer space available */
113*54fd6939SJiyong Park #define	EISCONN		56		/* Socket is already connected */
114*54fd6939SJiyong Park #define	ENOTCONN	57		/* Socket is not connected */
115*54fd6939SJiyong Park #define	ESHUTDOWN	58		/* Can't send after socket shutdown */
116*54fd6939SJiyong Park #define	ETOOMANYREFS	59		/* Too many references: can't splice */
117*54fd6939SJiyong Park #define	ETIMEDOUT	60		/* Operation timed out */
118*54fd6939SJiyong Park #define	ECONNREFUSED	61		/* Connection refused */
119*54fd6939SJiyong Park 
120*54fd6939SJiyong Park #define	ELOOP		62		/* Too many levels of symbolic links */
121*54fd6939SJiyong Park #define	ENAMETOOLONG	63		/* File name too long */
122*54fd6939SJiyong Park 
123*54fd6939SJiyong Park /* should be rearranged */
124*54fd6939SJiyong Park #define	EHOSTDOWN	64		/* Host is down */
125*54fd6939SJiyong Park #define	EHOSTUNREACH	65		/* No route to host */
126*54fd6939SJiyong Park #define	ENOTEMPTY	66		/* Directory not empty */
127*54fd6939SJiyong Park 
128*54fd6939SJiyong Park /* quotas & mush */
129*54fd6939SJiyong Park #define	EPROCLIM	67		/* Too many processes */
130*54fd6939SJiyong Park #define	EUSERS		68		/* Too many users */
131*54fd6939SJiyong Park #define	EDQUOT		69		/* Disc quota exceeded */
132*54fd6939SJiyong Park 
133*54fd6939SJiyong Park /* Network File System */
134*54fd6939SJiyong Park #define	ESTALE		70		/* Stale NFS file handle */
135*54fd6939SJiyong Park #define	EREMOTE		71		/* Too many levels of remote in path */
136*54fd6939SJiyong Park #define	EBADRPC		72		/* RPC struct is bad */
137*54fd6939SJiyong Park #define	ERPCMISMATCH	73		/* RPC version wrong */
138*54fd6939SJiyong Park #define	EPROGUNAVAIL	74		/* RPC prog. not avail */
139*54fd6939SJiyong Park #define	EPROGMISMATCH	75		/* Program version wrong */
140*54fd6939SJiyong Park #define	EPROCUNAVAIL	76		/* Bad procedure for program */
141*54fd6939SJiyong Park 
142*54fd6939SJiyong Park #define	ENOLCK		77		/* No locks available */
143*54fd6939SJiyong Park #define	ENOSYS		78		/* Function not implemented */
144*54fd6939SJiyong Park 
145*54fd6939SJiyong Park #define	EFTYPE		79		/* Inappropriate file type or format */
146*54fd6939SJiyong Park #define	EAUTH		80		/* Authentication error */
147*54fd6939SJiyong Park #define	ENEEDAUTH	81		/* Need authenticator */
148*54fd6939SJiyong Park #define	EIDRM		82		/* Identifier removed */
149*54fd6939SJiyong Park #define	ENOMSG		83		/* No message of desired type */
150*54fd6939SJiyong Park #define	EOVERFLOW	84		/* Value too large to be stored in data type */
151*54fd6939SJiyong Park #define	ECANCELED	85		/* Operation canceled */
152*54fd6939SJiyong Park #define	EILSEQ		86		/* Illegal byte sequence */
153*54fd6939SJiyong Park #define	ENOATTR		87		/* Attribute not found */
154*54fd6939SJiyong Park 
155*54fd6939SJiyong Park #define	EDOOFUS		88		/* Programming error */
156*54fd6939SJiyong Park 
157*54fd6939SJiyong Park #define	EBADMSG		89		/* Bad message */
158*54fd6939SJiyong Park #define	EMULTIHOP	90		/* Multihop attempted */
159*54fd6939SJiyong Park #define	ENOLINK		91		/* Link has been severed */
160*54fd6939SJiyong Park #define	EPROTO		92		/* Protocol error */
161*54fd6939SJiyong Park 
162*54fd6939SJiyong Park #define	ENOTCAPABLE	93		/* Capabilities insufficient */
163*54fd6939SJiyong Park #define	ECAPMODE	94		/* Not permitted in capability mode */
164*54fd6939SJiyong Park #define	ENOTRECOVERABLE	95		/* State not recoverable */
165*54fd6939SJiyong Park #define	EOWNERDEAD	96		/* Previous owner died */
166*54fd6939SJiyong Park 
167*54fd6939SJiyong Park #define	ELAST		96		/* Must be equal largest errno */
168*54fd6939SJiyong Park 
169*54fd6939SJiyong Park #endif /* ERRNO_H */
170