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