1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 2000 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ 28 /* All Rights Reserved */ 29 30 /* 31 * University Copyright- Copyright (c) 1982, 1986, 1988 32 * The Regents of the University of California 33 * All Rights Reserved 34 * 35 * University Acknowledgment- Portions of this document are derived from 36 * software developed by the University of California, Berkeley, and its 37 * contributors. 38 */ 39 40 #ifndef _SYS_ERRNO_H 41 #define _SYS_ERRNO_H 42 43 #pragma ident "%Z%%M% %I% %E% SMI" 44 45 #ifdef __cplusplus 46 extern "C" { 47 #endif 48 49 /* 50 * Error codes 51 */ 52 53 #define EPERM 1 /* Not super-user */ 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 /* I/O error */ 58 #define ENXIO 6 /* No such device or address */ 59 #define E2BIG 7 /* Arg list too long */ 60 #define ENOEXEC 8 /* Exec format error */ 61 #define EBADF 9 /* Bad file number */ 62 #define ECHILD 10 /* No children */ 63 #define EAGAIN 11 /* Resource temporarily unavailable */ 64 #define ENOMEM 12 /* Not enough core */ 65 #define EACCES 13 /* Permission denied */ 66 #define EFAULT 14 /* Bad address */ 67 #define ENOTBLK 15 /* Block device required */ 68 #define EBUSY 16 /* Mount device busy */ 69 #define EEXIST 17 /* File exists */ 70 #define EXDEV 18 /* Cross-device link */ 71 #define ENODEV 19 /* No such 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 /* File table overflow */ 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 #define EDOM 33 /* Math arg out of domain of func */ 86 #define ERANGE 34 /* Math result not representable */ 87 #define ENOMSG 35 /* No message of desired type */ 88 #define EIDRM 36 /* Identifier removed */ 89 #define ECHRNG 37 /* Channel number out of range */ 90 #define EL2NSYNC 38 /* Level 2 not synchronized */ 91 #define EL3HLT 39 /* Level 3 halted */ 92 #define EL3RST 40 /* Level 3 reset */ 93 #define ELNRNG 41 /* Link number out of range */ 94 #define EUNATCH 42 /* Protocol driver not attached */ 95 #define ENOCSI 43 /* No CSI structure available */ 96 #define EL2HLT 44 /* Level 2 halted */ 97 #define EDEADLK 45 /* Deadlock condition. */ 98 #define ENOLCK 46 /* No record locks available. */ 99 #define ECANCELED 47 /* Operation canceled */ 100 #define ENOTSUP 48 /* Operation not supported */ 101 102 /* Filesystem Quotas */ 103 #define EDQUOT 49 /* Disc quota exceeded */ 104 105 /* Convergent Error Returns */ 106 #define EBADE 50 /* invalid exchange */ 107 #define EBADR 51 /* invalid request descriptor */ 108 #define EXFULL 52 /* exchange full */ 109 #define ENOANO 53 /* no anode */ 110 #define EBADRQC 54 /* invalid request code */ 111 #define EBADSLT 55 /* invalid slot */ 112 #define EDEADLOCK 56 /* file locking deadlock error */ 113 114 #define EBFONT 57 /* bad font file fmt */ 115 116 /* Interprocess Robust Locks */ 117 #define EOWNERDEAD 58 /* process died with the lock */ 118 #define ENOTRECOVERABLE 59 /* lock is not recoverable */ 119 120 /* stream problems */ 121 #define ENOSTR 60 /* Device not a stream */ 122 #define ENODATA 61 /* no data (for no delay io) */ 123 #define ETIME 62 /* timer expired */ 124 #define ENOSR 63 /* out of streams resources */ 125 126 #define ENONET 64 /* Machine is not on the network */ 127 #define ENOPKG 65 /* Package not installed */ 128 #define EREMOTE 66 /* The object is remote */ 129 #define ENOLINK 67 /* the link has been severed */ 130 #define EADV 68 /* advertise error */ 131 #define ESRMNT 69 /* srmount error */ 132 133 #define ECOMM 70 /* Communication error on send */ 134 #define EPROTO 71 /* Protocol error */ 135 136 /* Interprocess Robust Locks */ 137 #define ELOCKUNMAPPED 72 /* locked lock was unmapped */ 138 139 #define ENOTACTIVE 73 /* Facility is not active */ 140 #define EMULTIHOP 74 /* multihop attempted */ 141 #define EBADMSG 77 /* trying to read unreadable message */ 142 #define ENAMETOOLONG 78 /* path name is too long */ 143 #define EOVERFLOW 79 /* value too large to be stored in data type */ 144 #define ENOTUNIQ 80 /* given log. name not unique */ 145 #define EBADFD 81 /* f.d. invalid for this operation */ 146 #define EREMCHG 82 /* Remote address changed */ 147 148 /* shared library problems */ 149 #define ELIBACC 83 /* Can't access a needed shared lib. */ 150 #define ELIBBAD 84 /* Accessing a corrupted shared lib. */ 151 #define ELIBSCN 85 /* .lib section in a.out corrupted. */ 152 #define ELIBMAX 86 /* Attempting to link in too many libs. */ 153 #define ELIBEXEC 87 /* Attempting to exec a shared library. */ 154 #define EILSEQ 88 /* Illegal byte sequence. */ 155 #define ENOSYS 89 /* Unsupported file system operation */ 156 #define ELOOP 90 /* Symbolic link loop */ 157 #define ERESTART 91 /* Restartable system call */ 158 #define ESTRPIPE 92 /* if pipe/FIFO, don't sleep in stream head */ 159 #define ENOTEMPTY 93 /* directory not empty */ 160 #define EUSERS 94 /* Too many users (for UFS) */ 161 162 /* BSD Networking Software */ 163 /* argument errors */ 164 #define ENOTSOCK 95 /* Socket operation on non-socket */ 165 #define EDESTADDRREQ 96 /* Destination address required */ 166 #define EMSGSIZE 97 /* Message too long */ 167 #define EPROTOTYPE 98 /* Protocol wrong type for socket */ 168 #define ENOPROTOOPT 99 /* Protocol not available */ 169 #define EPROTONOSUPPORT 120 /* Protocol not supported */ 170 #define ESOCKTNOSUPPORT 121 /* Socket type not supported */ 171 #define EOPNOTSUPP 122 /* Operation not supported on socket */ 172 #define EPFNOSUPPORT 123 /* Protocol family not supported */ 173 #define EAFNOSUPPORT 124 /* Address family not supported by */ 174 /* protocol family */ 175 #define EADDRINUSE 125 /* Address already in use */ 176 #define EADDRNOTAVAIL 126 /* Can't assign requested address */ 177 /* operational errors */ 178 #define ENETDOWN 127 /* Network is down */ 179 #define ENETUNREACH 128 /* Network is unreachable */ 180 #define ENETRESET 129 /* Network dropped connection because */ 181 /* of reset */ 182 #define ECONNABORTED 130 /* Software caused connection abort */ 183 #define ECONNRESET 131 /* Connection reset by peer */ 184 #define ENOBUFS 132 /* No buffer space available */ 185 #define EISCONN 133 /* Socket is already connected */ 186 #define ENOTCONN 134 /* Socket is not connected */ 187 /* XENIX has 135 - 142 */ 188 #define ESHUTDOWN 143 /* Can't send after socket shutdown */ 189 #define ETOOMANYREFS 144 /* Too many references: can't splice */ 190 #define ETIMEDOUT 145 /* Connection timed out */ 191 #define ECONNREFUSED 146 /* Connection refused */ 192 #define EHOSTDOWN 147 /* Host is down */ 193 #define EHOSTUNREACH 148 /* No route to host */ 194 #define EWOULDBLOCK EAGAIN 195 #define EALREADY 149 /* operation already in progress */ 196 #define EINPROGRESS 150 /* operation now in progress */ 197 198 /* SUN Network File System */ 199 #define ESTALE 151 /* Stale NFS file handle */ 200 201 202 #ifdef __cplusplus 203 } 204 #endif 205 206 #endif /* _SYS_ERRNO_H */ 207