184778508Sblueswir1 /* 284778508Sblueswir1 * Copyright (c) 1982, 1986, 1989, 1993 384778508Sblueswir1 * The Regents of the University of California. All rights reserved. 484778508Sblueswir1 * (c) UNIX System Laboratories, Inc. 584778508Sblueswir1 * All or some portions of this file are derived from material licensed 684778508Sblueswir1 * to the University of California by American Telephone and Telegraph 784778508Sblueswir1 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 884778508Sblueswir1 * the permission of UNIX System Laboratories, Inc. 984778508Sblueswir1 * 1084778508Sblueswir1 * Redistribution and use in source and binary forms, with or without 1184778508Sblueswir1 * modification, are permitted provided that the following conditions 1284778508Sblueswir1 * are met: 1384778508Sblueswir1 * 1. Redistributions of source code must retain the above copyright 1484778508Sblueswir1 * notice, this list of conditions and the following disclaimer. 1584778508Sblueswir1 * 2. Redistributions in binary form must reproduce the above copyright 1684778508Sblueswir1 * notice, this list of conditions and the following disclaimer in the 1784778508Sblueswir1 * documentation and/or other materials provided with the distribution. 1884778508Sblueswir1 * 3. Neither the name of the University nor the names of its contributors 1984778508Sblueswir1 * may be used to endorse or promote products derived from this software 2084778508Sblueswir1 * without specific prior written permission. 2184778508Sblueswir1 * 2284778508Sblueswir1 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2384778508Sblueswir1 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2484778508Sblueswir1 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2584778508Sblueswir1 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2684778508Sblueswir1 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2784778508Sblueswir1 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2884778508Sblueswir1 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2984778508Sblueswir1 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3084778508Sblueswir1 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3184778508Sblueswir1 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3284778508Sblueswir1 * SUCH DAMAGE. 3384778508Sblueswir1 * 3484778508Sblueswir1 * @(#)errno.h 8.5 (Berkeley) 1/21/94 3584778508Sblueswir1 */ 3684778508Sblueswir1 379c092804SMarkus Armbruster #ifndef ERRNO_DEFS_H 389c092804SMarkus Armbruster #define ERRNO_DEFS_H 397cb4d7c9SStacey Son 4084778508Sblueswir1 #define TARGET_EPERM 1 /* Operation not permitted */ 4184778508Sblueswir1 #define TARGET_ENOENT 2 /* No such file or directory */ 4284778508Sblueswir1 #define TARGET_ESRCH 3 /* No such process */ 4384778508Sblueswir1 #define TARGET_EINTR 4 /* Interrupted system call */ 4484778508Sblueswir1 #define TARGET_EIO 5 /* Input/output error */ 4584778508Sblueswir1 #define TARGET_ENXIO 6 /* Device not configured */ 4684778508Sblueswir1 #define TARGET_E2BIG 7 /* Argument list too long */ 4784778508Sblueswir1 #define TARGET_ENOEXEC 8 /* Exec format error */ 4884778508Sblueswir1 #define TARGET_EBADF 9 /* Bad file descriptor */ 4984778508Sblueswir1 #define TARGET_ECHILD 10 /* No child processes */ 5084778508Sblueswir1 #define TARGET_EDEADLK 11 /* Resource deadlock avoided */ 5184778508Sblueswir1 /* 11 was EAGAIN */ 5284778508Sblueswir1 #define TARGET_ENOMEM 12 /* Cannot allocate memory */ 5384778508Sblueswir1 #define TARGET_EACCES 13 /* Permission denied */ 5484778508Sblueswir1 #define TARGET_EFAULT 14 /* Bad address */ 5584778508Sblueswir1 #define TARGET_ENOTBLK 15 /* Block device required */ 5684778508Sblueswir1 #define TARGET_EBUSY 16 /* Device busy */ 5784778508Sblueswir1 #define TARGET_EEXIST 17 /* File exists */ 5884778508Sblueswir1 #define TARGET_EXDEV 18 /* Cross-device link */ 5984778508Sblueswir1 #define TARGET_ENODEV 19 /* Operation not supported by device */ 6084778508Sblueswir1 #define TARGET_ENOTDIR 20 /* Not a directory */ 6184778508Sblueswir1 #define TARGET_EISDIR 21 /* Is a directory */ 6284778508Sblueswir1 #define TARGET_EINVAL 22 /* Invalid argument */ 6384778508Sblueswir1 #define TARGET_ENFILE 23 /* Too many open files in system */ 6484778508Sblueswir1 #define TARGET_EMFILE 24 /* Too many open files */ 6584778508Sblueswir1 #define TARGET_ENOTTY 25 /* Inappropriate ioctl for device */ 6684778508Sblueswir1 #define TARGET_ETXTBSY 26 /* Text file busy */ 6784778508Sblueswir1 #define TARGET_EFBIG 27 /* File too large */ 6884778508Sblueswir1 #define TARGET_ENOSPC 28 /* No space left on device */ 6984778508Sblueswir1 #define TARGET_ESPIPE 29 /* Illegal seek */ 7084778508Sblueswir1 #define TARGET_EROFS 30 /* Read-only file system */ 7184778508Sblueswir1 #define TARGET_EMLINK 31 /* Too many links */ 7284778508Sblueswir1 #define TARGET_EPIPE 32 /* Broken pipe */ 7384778508Sblueswir1 7484778508Sblueswir1 /* math software */ 7584778508Sblueswir1 #define TARGET_EDOM 33 /* Numerical argument out of domain */ 7684778508Sblueswir1 #define TARGET_ERANGE 34 /* Result too large */ 7784778508Sblueswir1 7884778508Sblueswir1 /* non-blocking and interrupt i/o */ 7984778508Sblueswir1 #define TARGET_EAGAIN 35 /* Resource temporarily unavailable */ 8084778508Sblueswir1 #define TARGET_EWOULDBLOCK EAGAIN /* Operation would block */ 8184778508Sblueswir1 #define TARGET_EINPROGRESS 36 /* Operation now in progress */ 8284778508Sblueswir1 #define TARGET_EALREADY 37 /* Operation already in progress */ 8384778508Sblueswir1 8484778508Sblueswir1 /* ipc/network software -- argument errors */ 8584778508Sblueswir1 #define TARGET_ENOTSOCK 38 /* Socket operation on non-socket */ 8684778508Sblueswir1 #define TARGET_EDESTADDRREQ 39 /* Destination address required */ 8784778508Sblueswir1 #define TARGET_EMSGSIZE 40 /* Message too long */ 8884778508Sblueswir1 #define TARGET_EPROTOTYPE 41 /* Protocol wrong type for socket */ 8984778508Sblueswir1 #define TARGET_ENOPROTOOPT 42 /* Protocol not available */ 9084778508Sblueswir1 #define TARGET_EPROTONOSUPPORT 43 /* Protocol not supported */ 9184778508Sblueswir1 #define TARGET_ESOCKTNOSUPPORT 44 /* Socket type not supported */ 9284778508Sblueswir1 #define TARGET_EOPNOTSUPP 45 /* Operation not supported */ 9384778508Sblueswir1 #define TARGET_EPFNOSUPPORT 46 /* Protocol family not supported */ 9484778508Sblueswir1 #define TARGET_EAFNOSUPPORT 47 /* Address family not supported by protocol family */ 9584778508Sblueswir1 #define TARGET_EADDRINUSE 48 /* Address already in use */ 9684778508Sblueswir1 #define TARGET_EADDRNOTAVAIL 49 /* Can't assign requested address */ 9784778508Sblueswir1 9884778508Sblueswir1 /* ipc/network software -- operational errors */ 9984778508Sblueswir1 #define TARGET_ENETDOWN 50 /* Network is down */ 10084778508Sblueswir1 #define TARGET_ENETUNREACH 51 /* Network is unreachable */ 10184778508Sblueswir1 #define TARGET_ENETRESET 52 /* Network dropped connection on reset */ 10284778508Sblueswir1 #define TARGET_ECONNABORTED 53 /* Software caused connection abort */ 10384778508Sblueswir1 #define TARGET_ECONNRESET 54 /* Connection reset by peer */ 10484778508Sblueswir1 #define TARGET_ENOBUFS 55 /* No buffer space available */ 10584778508Sblueswir1 #define TARGET_EISCONN 56 /* Socket is already connected */ 10684778508Sblueswir1 #define TARGET_ENOTCONN 57 /* Socket is not connected */ 10784778508Sblueswir1 #define TARGET_ESHUTDOWN 58 /* Can't send after socket shutdown */ 10884778508Sblueswir1 #define TARGET_ETOOMANYREFS 59 /* Too many references: can't splice */ 10984778508Sblueswir1 #define TARGET_ETIMEDOUT 60 /* Operation timed out */ 11084778508Sblueswir1 #define TARGET_ECONNREFUSED 61 /* Connection refused */ 11184778508Sblueswir1 11284778508Sblueswir1 #define TARGET_ELOOP 62 /* Too many levels of symbolic links */ 11384778508Sblueswir1 #define TARGET_ENAMETOOLONG 63 /* File name too long */ 11484778508Sblueswir1 11584778508Sblueswir1 /* should be rearranged */ 11684778508Sblueswir1 #define TARGET_EHOSTDOWN 64 /* Host is down */ 11784778508Sblueswir1 #define TARGET_EHOSTUNREACH 65 /* No route to host */ 11884778508Sblueswir1 #define TARGET_ENOTEMPTY 66 /* Directory not empty */ 11984778508Sblueswir1 12084778508Sblueswir1 /* quotas & mush */ 12184778508Sblueswir1 #define TARGET_EPROCLIM 67 /* Too many processes */ 12284778508Sblueswir1 #define TARGET_EUSERS 68 /* Too many users */ 12384778508Sblueswir1 #define TARGET_EDQUOT 69 /* Disk quota exceeded */ 12484778508Sblueswir1 12584778508Sblueswir1 /* Network File System */ 12684778508Sblueswir1 #define TARGET_ESTALE 70 /* Stale NFS file handle */ 12784778508Sblueswir1 #define TARGET_EREMOTE 71 /* Too many levels of remote in path */ 12884778508Sblueswir1 #define TARGET_EBADRPC 72 /* RPC struct is bad */ 12984778508Sblueswir1 #define TARGET_ERPCMISMATCH 73 /* RPC version wrong */ 13084778508Sblueswir1 #define TARGET_EPROGUNAVAIL 74 /* RPC prog. not avail */ 13184778508Sblueswir1 #define TARGET_EPROGMISMATCH 75 /* Program version wrong */ 13284778508Sblueswir1 #define TARGET_EPROCUNAVAIL 76 /* Bad procedure for program */ 13384778508Sblueswir1 13484778508Sblueswir1 #define TARGET_ENOLCK 77 /* No locks available */ 13584778508Sblueswir1 #define TARGET_ENOSYS 78 /* Function not implemented */ 13684778508Sblueswir1 13784778508Sblueswir1 #define TARGET_EFTYPE 79 /* Inappropriate file type or format */ 13884778508Sblueswir1 #define TARGET_EAUTH 80 /* Authentication error */ 13984778508Sblueswir1 #define TARGET_ENEEDAUTH 81 /* Need authenticator */ 14084778508Sblueswir1 #define TARGET_EIPSEC 82 /* IPsec processing failure */ 14184778508Sblueswir1 #define TARGET_ENOATTR 83 /* Attribute not found */ 14284778508Sblueswir1 #define TARGET_EILSEQ 84 /* Illegal byte sequence */ 14384778508Sblueswir1 #define TARGET_ENOMEDIUM 85 /* No medium found */ 14484778508Sblueswir1 #define TARGET_EMEDIUMTYPE 86 /* Wrong Medium Type */ 14584778508Sblueswir1 #define TARGET_EOVERFLOW 87 /* Conversion overflow */ 14684778508Sblueswir1 #define TARGET_ECANCELED 88 /* Operation canceled */ 14784778508Sblueswir1 #define TARGET_EIDRM 89 /* Identifier removed */ 14884778508Sblueswir1 #define TARGET_ENOMSG 90 /* No message of desired type */ 14984778508Sblueswir1 #define TARGET_ELAST 90 /* Must be equal largest errno */ 1507cb4d7c9SStacey Son 1517cb4d7c9SStacey Son /* Internal errors: */ 152*944399ffSMichael Tokarev #define TARGET_EJUSTRETURN 254 /* Just return without modifying regs */ 1537cb4d7c9SStacey Son #define TARGET_ERESTART 255 /* Restart syscall */ 1542ac16d01SRichard Henderson 1552ac16d01SRichard Henderson #include "special-errno.h" 1562ac16d01SRichard Henderson 1572ac16d01SRichard Henderson _Static_assert(TARGET_ERESTART == QEMU_ERESTARTSYS, 1582ac16d01SRichard Henderson "TARGET_ERESTART and QEMU_ERESTARTSYS expected to match"); 1597cb4d7c9SStacey Son 1609c092804SMarkus Armbruster #endif /* ERRNO_DEFS_H */ 161