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