|
|
1.1 ! root 1: #ifndef __SYS_ERRNO_H__ ! 2: #define __SYS_ERRNO_H__ ! 3: ! 4: /* ! 5: * Error numbers for DDI/DKI drivers, as described in errnos (D5DK) in the ! 6: * System V, Release 4 Multiprocessor "Device Driver Interface/Driver-Kernel ! 7: * Interface Reference Manual". The additional commentary for the error ! 8: * numbers also comes from this source, along with commentary from the SVR4 ! 9: * "Programmer's Reference Manual". RFS errors have not been included. ! 10: * ! 11: * Actual numeric values of error constants are derived from the System V ABI ! 12: * "Intel 386 Processor Supplement". ! 13: * ! 14: * If these definitions are to be imported by <errno.h>, they *must* be macros ! 15: * rather than enumerations or other kinds of constant, as required by the ISO ! 16: * C standard (ISO/IEC 9989-1990). ! 17: * ! 18: * User-level programs should not use this file directly. ! 19: */ ! 20: ! 21: #define EPERM 1 ! 22: /* ! 23: * PRM: Not super-user. Typically this error indicates an attempt to ! 24: * modify a file in some way forbidden except to its owner or the ! 25: * super-user. It is also returned for attempts by ordinary users to ! 26: * do things only permitted to the super-user. ! 27: * ! 28: * DDI/DKI: Permission denied. Drivers can return this error when an ! 29: * operation is attempted that requires more privelege than the ! 30: * current process has. ! 31: */ ! 32: #define ENOENT 2 ! 33: /* ! 34: * PRM: No such file or directory. A file name is specified and the ! 35: * file should exist but doesn't, or one of the directories in a path ! 36: * name does not exist. ! 37: */ ! 38: #define ESRCH 3 ! 39: /* ! 40: * PRM: No such process. No process can be found corresponding to that ! 41: * specified by PID in the kill () or ptrace () routine. ! 42: */ ! 43: #define EINTR 4 ! 44: /* ! 45: * PRM: Interrupted system call. An asynchronous signal (such as ! 46: * interrupt or quit), which the user has elected to catch, occurred ! 47: * during a system service routine. If execution is resumed after ! 48: * processing the signal, it will appear as if the interrupted routine ! 49: * call returned this error condition. ! 50: * ! 51: * DDI/DKI: Interrupted operation. Drivers can return this error ! 52: * whenever an interruptible operation is interrupted by receipt of an ! 53: * asynchronous signal. ! 54: */ ! 55: #define EIO 5 ! 56: /* ! 57: * PRM: I/O error. Some physical I/O error has occurred. This error ! 58: * may in some cases occur on a call following the one to which it ! 59: * actually applies. ! 60: * ! 61: * DDI/DKI: An I/O error has occurred. Drivers can return this error ! 62: * when an input or output request has failed. ! 63: */ ! 64: #define ENXIO 6 ! 65: /* ! 66: * PRM: No such device or address. I/O on a special file refers to a ! 67: * subdevice which does not exists, or exists beyond the limit of the ! 68: * device. It may also occur when, for example, a tape drive is not ! 69: * on-line or no disk pack is loaded on a drive. ! 70: * ! 71: * DDI/DKI: No such device or address. Drivers can return this error ! 72: * when trying to open an invalid minor device, or when trying to ! 73: * perform I/O past the end of a device. ! 74: */ ! 75: #define E2BIG 7 ! 76: /* ! 77: * PRM: Argument list too long. An argument list longer than ARG_MAX ! 78: * bytes is presented to a member of the exec... () family of ! 79: * routines. The argument list limit is the sum of the size of the ! 80: * argument list plus the size of the environment's exported shell ! 81: * variables. ! 82: */ ! 83: #define ENOEXEC 8 ! 84: /* ! 85: * PRM: Exec format error. A request is made to execute a file which, ! 86: * although it has the appropriate permissions, does not start with a ! 87: * valid format. ! 88: */ ! 89: #define EBADF 9 ! 90: /* ! 91: * PRM: Bad file number. Either a file descriptor refers to no open ! 92: * file, or a read () [respectively, write ()] request is made to a ! 93: * file that is open only for writing [respectively, reading]. ! 94: */ ! 95: #define ECHILD 10 ! 96: /* ! 97: * PRM: No child processes. A wait () routine was executed by a ! 98: * process that has no existing or unwaited-for child processes. ! 99: */ ! 100: #define EAGAIN 11 ! 101: /* ! 102: * PRM: No more processes. For example, a fork () routine failed ! 103: * because the system's process table is full or the user is not ! 104: * allowed to create any more processes, or a system call failed ! 105: * because of insufficient memory or swap space. ! 106: * ! 107: * DDI/DKI: Temporary resource allocation failure; try again later. ! 108: * Drivers can return this error when resource allocation fails, for ! 109: * example kmem_alloc () or allocb (). ! 110: */ ! 111: #define ENOMEM 12 ! 112: /* ! 113: * PRM: Not enough space. During execution of an exec (), brk (), or ! 114: * sbrk () routine, a program asks for more space than the system is ! 115: * able to supply. This is not a temporary condition; the maximum size ! 116: * is a system parameter. The error may also occur if the arrangement ! 117: * of text, data, and stack segments requires too many segmentation ! 118: * registers, or if there is not enough swap space during the fork () ! 119: * routine. ! 120: * ! 121: * DDI/DKI: Not enough memory. Drivers can return this error when ! 122: * resource allocation fails and it is either inconvenient or ! 123: * impossible for a retry to occur. ! 124: */ ! 125: #define EACCES 13 ! 126: /* ! 127: * PRM, DDI/DKI: Permission denied. An attempt was made to access a ! 128: * file in a way forbidden by its file access permissions. ! 129: */ ! 130: #define EFAULT 14 ! 131: /* ! 132: * PRM: Bad address. The system encountered a hardware fault in ! 133: * attempting to use an argument of a routine. For example, "errno" ! 134: * potentially may be set to EFAULT any time a routine that takes a ! 135: * pointer argument is passed an invalid address, if the system can ! 136: * detect the condition. Because systems will differ in their ability ! 137: * to reliably detect a bad address, on some implementations passing a ! 138: * bad address to a routine will result in undefined behavior. ! 139: * ! 140: * DDI/DKI: Bad address. Drivers should return this error whenever a ! 141: * call to copyin () or copyout () fails. ! 142: */ ! 143: #define ENOTBLK 15 ! 144: /* ! 145: * PRM: Block device required. A non-block file was mentioned where a ! 146: * block device was required (e.g., in a call to the mount () ! 147: * routine). ! 148: */ ! 149: #define EBUSY 16 ! 150: /* ! 151: * PRM: Device busy. An attempt was made to mount a device that was ! 152: * already mounted or an attempt was made to unmount a device on which ! 153: * there is an active file (open file, current directory, mounted-on ! 154: * file, active text segment). It will also occur if an attempt it ! 155: * made to enable accounting when it is already enabled. The device or ! 156: * resource is currently unavailable. ! 157: * ! 158: * DDI/DKI: Device is busy. This can be used for devices that require ! 159: * exclusive access. ! 160: */ ! 161: #define EEXIST 17 ! 162: /* ! 163: * PRM: File exists. An existing file was mentioned in an ! 164: * inappropriate context (e.g., call to the link () routine). ! 165: */ ! 166: #define EXDEV 18 ! 167: /* ! 168: * PRM: Cross-device link. A link to a file on another device was ! 169: * attempted. ! 170: */ ! 171: #define ENODEV 19 ! 172: /* ! 173: * PRM: No such device. An attempt was made to apply an inappropriate ! 174: * operation to a device (e.g., read a write-only device). ! 175: * ! 176: * DDI/DKI: No such device. Drivers can return this error when an ! 177: * attempt is made to apply an inappropriate function to a device; for ! 178: * example, trying to write a write-protected medium. ! 179: */ ! 180: #define ENOTDIR 20 ! 181: /* ! 182: * PRM: Not a directory. A non-directory was specified where a ! 183: * directory is required (e.g., in a path prefix or as an argument to ! 184: * the chdir () routine). ! 185: */ ! 186: #define EISDIR 21 ! 187: /* ! 188: * PRM: Is a directory. An attempt was made to write on a directory. ! 189: */ ! 190: #define EINVAL 22 ! 191: /* ! 192: * PRM: Invalid argument. An invalid argument was specified (e.g., ! 193: * unmounting a non-mounted device, mentioning an undefined signal in ! 194: * a call to the signal () or kill () routines). ! 195: * ! 196: * DDI/DKI: Invalid argument. Drivers can return this error for ! 197: * operations that have invalid parameters specified. ! 198: */ ! 199: #define ENFILE 23 ! 200: /* ! 201: * PRM: File table overflow. The system file table is full (i.e., ! 202: * SYS_OPEN files are open, and temporarily no more files can be ! 203: * opened). ! 204: */ ! 205: #define EMFILE 24 ! 206: /* ! 207: * PRM: Too many open files. No process can have more than OPEN_MAX ! 208: * file descriptors open at a time. ! 209: */ ! 210: #define ENOTTY 25 ! 211: /* ! 212: * PRM: Not a typewriter. A call was made to the ioctl () routine ! 213: * specifying a file that is not a special character device. ! 214: */ ! 215: #define ETXTBSY 26 ! 216: /* ! 217: * PRM: Text file busy. An attempt was made to execute a pure- ! 218: * procedure program that is currently open for writing, or an attempt ! 219: * to open for writing (or to remove) a pure-procedure program that is ! 220: * being executed. ! 221: */ ! 222: #define EFBIG 27 ! 223: /* ! 224: * PRM: File too large. The size of a file exceeded the maximum file ! 225: * size, FCHR_MAX [see getrlimit ()]. ! 226: */ ! 227: #define ENOSPC 28 ! 228: /* ! 229: * PRM: No space left on device. When writing an ordinary file or ! 230: * creating a directory entry, there is no free space left on the ! 231: * device. ! 232: * ! 233: * DDI/DKI: The device is out of free space. ! 234: */ ! 235: #define ESPIPE 29 ! 236: /* ! 237: * PRM: Illegal seek. A call to the lseek () routine was issued to a ! 238: * pipe. ! 239: */ ! 240: #define EROFS 30 ! 241: /* ! 242: * PRM: Read-only file system. An attempt to modify a file or ! 243: * directory was made on a device mounted read-only. ! 244: */ ! 245: #define EMLINK 31 ! 246: /* ! 247: * PRM: Too many links. An attempt to make more than the maximum ! 248: * number of links, LINK_MAX, to a file. ! 249: */ ! 250: #define EPIPE 32 ! 251: /* ! 252: * PRM: Broken pipe. A write on a pipe for which there is no process ! 253: * to read the data. This condition normally generates a signal; the ! 254: * error is returned if the signal is ignored. ! 255: */ ! 256: #define EDOM 33 ! 257: /* ! 258: * PRM: Math argument out of domain of function. The argument of a ! 259: * function in the math package is out of the domain of the function. ! 260: */ ! 261: #define ERANGE 34 ! 262: /* ! 263: * PRM: Math result not representable. The value of a function in the ! 264: * math package is not representable within machine precision. ! 265: */ ! 266: #define ENOMSG 35 ! 267: /* ! 268: * PRM: No message of desired type. An attempt was made to retrieve a ! 269: * message of a type that does not exist on the specified message ! 270: * queue [see msgop ()]. ! 271: */ ! 272: #define EIDRM 36 ! 273: /* ! 274: * PRM: Identifier removed. This error is returned to processes that ! 275: * resume execution due to the removal of an identifier from the file ! 276: * system's name space [see msgctl (), semctl (), and shmctl ()]. ! 277: */ ! 278: #define EDEADLK 45 ! 279: /* ! 280: * PRM: Deadlock condition. A deadlock situation was detected and ! 281: * avoided. This error pertains to file and record locking. ! 282: */ ! 283: #define ENOLCK 46 ! 284: /* ! 285: * PRM: No record locks available. There are no more locks available. ! 286: * The system lock table is full [see fcntl ()]. ! 287: */ ! 288: #define ENOSTR 60 ! 289: /* ! 290: * PRM: Device not a stream. A putmsg () or getmsg () system call was ! 291: * attempted on a file descriptor that is not a STREAMS device. ! 292: */ ! 293: #define ENODATA 61 ! 294: /* ! 295: * PRM: No data available. ! 296: * ! 297: * Returned from an I_GETBAND ioctl (). ! 298: */ ! 299: #define ETIME 62 ! 300: /* ! 301: * PRM: Timer expired. The timer set for a STREAMS ioctl () call has ! 302: * expired. The cause of this error is device-specific and could ! 303: * indicate either a hardware or software failure, or perhaps a ! 304: * timeout value that is too short for the specific operation. The ! 305: * status of the ioctl () operation is indeterminate. ! 306: */ ! 307: #define ENOSR 63 ! 308: /* ! 309: * PRM: Out of STREAMS resources. During a STREAMS open either no ! 310: * STREAMS queues or no STREAMS head data structures were available. ! 311: * This is a temporary condition; one may recover from it if other ! 312: * processes release resources. ! 313: */ ! 314: #define ENOPKG 65 ! 315: /* ! 316: * PRM: Package not installed. This error occurs when users attempt to ! 317: * use a system call from a package which has not been installed. ! 318: */ ! 319: #define EPROTO 71 ! 320: /* ! 321: * PRM: Protocol error. Some protocol error has occurred. This error ! 322: * is device-specific, but is generally not related to a hardware ! 323: * failure. ! 324: * ! 325: * DDI/DKI: Protocol error. Drivers can return this error when they ! 326: * incur a protocol error, such as not being able to generate the ! 327: * proper protocol message because of resource exhaustion, and not ! 328: * being able to recover gracefully. ! 329: */ ! 330: #define EBADMSG 77 ! 331: /* ! 332: * PRM: Not a data message. During a read (), getmsg (), or ioctl () ! 333: * I_RECVFD system call to a STREAMS device, something has come to the ! 334: * head of the queue that cannot be processed. That something depends ! 335: * on the system call: ! 336: * read (): control information or a passed file descriptor. ! 337: * getmsg (): passed file descriptor. ! 338: * ioctl (): control or data information. ! 339: */ ! 340: #define ENAMETOOLONG 78 ! 341: /* ! 342: * PRM: File name too long. The length of a path argument exceeds ! 343: * PATH_MAX, or the length of a path component exceeds NAME_MAX while ! 344: * _POSIX_NO_TRUNC is in effect; see limits(4). ! 345: */ ! 346: #define EOVERFLOW 79 ! 347: /* ! 348: * PRM: Value too large for defined data type. ! 349: * ! 350: * This can happen due to differences in data formats between system ! 351: * revisions; for instance, some system data such as user IDs and ! 352: * device IDs may be too large to deliver to an application built for ! 353: * an earlier system revision. ! 354: */ ! 355: #define ENOTUNIQ 80 ! 356: /* ! 357: * PRM: Name not unique on network. ! 358: */ ! 359: #define EBADFD 81 ! 360: /* ! 361: * PRM: File descriptor in bad state. Either a file descriptor refers ! 362: * to no open file or a read request was made to a file that is open ! 363: * only for writing. ! 364: */ ! 365: #define EREMCHG 82 ! 366: /* ! 367: * PRM: Remote address changed. ! 368: */ ! 369: #define ELIBACC 83 ! 370: /* ! 371: * PRM: Cannot access a needed shared library. Trying to exec () an ! 372: * "a.out" that requires a static shared library and the static shared ! 373: * library doesn't exist or the user doesn't have permissions to use ! 374: * it. ! 375: */ ! 376: #define ELIBBAD 84 ! 377: /* ! 378: * PRM: Accessing a corrupted shared library. Trying to exec () an ! 379: * "a.out" that requires a static shared library and exec () could not ! 380: * load the static shared library. The static shared library is ! 381: * probably corrupted. ! 382: */ ! 383: #define ELIBSCN 85 ! 384: /* ! 385: * PRM: ".lib" section in "a.out" corrupted. Trying to exec () an ! 386: * "a.out" that requires a static shared library and there was ! 387: * erroneous data in the ".lib" section of the "a.out". The ".lib" ! 388: * section tells exec () what static shared libraries are needed. The ! 389: * "a.out" is probably corrupted. ! 390: */ ! 391: #define ELIBMAX 86 ! 392: /* ! 393: * PRM: Attempting to link in more shared libraries than system limit. ! 394: * Trying to exec () an "a.out" that requires more static shared ! 395: * libraries than is allowed on the current configuration of the ! 396: * system. ! 397: */ ! 398: #define ELIBEXEC 87 ! 399: /* ! 400: * PRM: Cannot exec () a shared library directly. ! 401: */ ! 402: #define EILSEQ 88 ! 403: /* ! 404: * PRM: Illegal byte sequence. Handle multiple characters as a single ! 405: * character. ! 406: */ ! 407: #define ENOSYS 89 ! 408: /* ! 409: * PRM: Operation not applicable. ! 410: */ ! 411: #define ELOOP 90 ! 412: /* ! 413: * PRM: Number of symbolic links encountered during path name ! 414: * traversal exceeds MAXSYMLINKS. ! 415: */ ! 416: #define EUSERS 94 ! 417: /* ! 418: * PRM: Too many users. ! 419: */ ! 420: #define ENOTSOCK 95 ! 421: /* ! 422: * PRM: Socket operation on non-socket. ! 423: */ ! 424: #define EDESTADDRREQ 96 ! 425: /* ! 426: * PRM, DDI/DKI: Destination address required. A required destination ! 427: * address was omitted from an operation on a transport endpoint. ! 428: */ ! 429: #define EMSGSIZE 97 ! 430: /* ! 431: * PRM, DDI/DKI: Message too long. A message sent on a transport ! 432: * provider was larger than the internal message buffer or some other ! 433: * network limit. ! 434: */ ! 435: #define EPROTOTYPE 98 ! 436: /* ! 437: * PRM: Protocol wrong type for socket. A protocol was specified that ! 438: * does not support the semantics of the socket type requested. ! 439: */ ! 440: #define ENOPROTOOPT 99 ! 441: /* ! 442: * PRM: Protocol not available. A bad option or level was specified ! 443: * when getting or setting options for a protocol. ! 444: * ! 445: * DDI/DKI: The protocol option requested is not available at the ! 446: * level indicated. ! 447: */ ! 448: #define EPROTONOSUPPORT 120 ! 449: /* ! 450: * PRM: Protocol not supported. The protocol has not been configured ! 451: * into the system or no implementation for it exists. ! 452: */ ! 453: #define ESOCKTNOSUPPORT 121 ! 454: /* ! 455: * PRM: Socket type not supported. The support for the socket type has ! 456: * not been configured into the system or no implementation for it ! 457: * exists. ! 458: */ ! 459: #define EOPNOTSUPP 122 ! 460: /* ! 461: * PRM: Operation not supported on transport endpoint. For example, ! 462: * trying to accept a connection on a datagram transport endpoint. ! 463: */ ! 464: #define EPFNOSUPPORT 123 ! 465: /* ! 466: * PRM: Protocol family not supported. The protocol family has not ! 467: * been configured into the system or no implementation for it exists. ! 468: * Used for the Internet protocols. ! 469: */ ! 470: #define EAFNOSUPPORT 124 ! 471: /* ! 472: * PRM: Address family not supported by protocol family. An address ! 473: * incompatible with the requested protocol was used. ! 474: * ! 475: * DDI/DKI: The address family specified is not installed or supported ! 476: * on the host. ! 477: */ ! 478: #define EADDRINUSE 125 ! 479: /* ! 480: * PRM, DDI/DKI: Address already in use. User attempted to use an ! 481: * address already in use, and the protocol does not allow this. ! 482: */ ! 483: #define EADDRNOTAVAIL 126 ! 484: /* ! 485: * PRM, DDI/DKI: Cannot assign requested address. Results from an ! 486: * attempt to create a transport endpoint with an address not on the ! 487: * current machine. ! 488: */ ! 489: #define ENETDOWN 127 ! 490: /* ! 491: * PRM, DDI/DKI: Network is down. Operation encountered a dead ! 492: * network. ! 493: */ ! 494: #define ENETUNREACH 128 ! 495: /* ! 496: * PRM, DDI/DKI: Network is unreachable. Operation was attempted to an ! 497: * unreachable network. ! 498: */ ! 499: #define ENETRESET 129 ! 500: /* ! 501: * PRM, DDI/DKI: Network dropped connection because of reset. The host ! 502: * or network you were connected to crashed and rebooted. ! 503: */ ! 504: #define ECONNABORTED 130 ! 505: /* ! 506: * PRM, DDI/DKI: Software-caused connection abort. A received ! 507: * connection request was aborted was aborted when the peer closed its ! 508: * endpoint. ! 509: */ ! 510: #define ECONNRESET 131 ! 511: /* ! 512: * PRM, DDI/DKI: Connection reset by peer. A connection was forcibly ! 513: * closed by a peer. This normally results from a loss of the ! 514: * connection on the remote host due to a timeout or a reboot. ! 515: */ ! 516: #define ENOBUFS 132 ! 517: /* ! 518: * PRM, DDI/DKI: No buffer space available. An operation on a ! 519: * transport endpoint or pipe was not performed because the system ! 520: * lacked sufficient buffer space or because a queue was full. ! 521: */ ! 522: #define EISCONN 133 ! 523: /* ! 524: * PRM, DDI/DKI: Transport endpoint is already connected. A connect ! 525: * request was made on an already connected transport endpoint; or, a ! 526: * sendto () or sendmsg () request on a connected transport endpoint ! 527: * specified a destination when already connected. ! 528: */ ! 529: #define ENOTCONN 134 ! 530: /* ! 531: * PRM, DDI/DKI: Transport endpoint is not connected. A request to ! 532: * send or receive data was disallowed because the transport endpoint ! 533: * is not connected, or (when sending a datagram) no address was ! 534: * supplied. ! 535: */ ! 536: #define ESHUTDOWN 143 ! 537: /* ! 538: * PRM, DDI/DKI: Cannot send after transport endpoint shutdown. A ! 539: * request to send data was disallowed because the transport endpoint ! 540: * has already been shut down. ! 541: */ ! 542: #define ETIMEDOUT 145 ! 543: /* ! 544: * PRM, DDI/DKI: Connection timed out. A connect or sent request ! 545: * failed because the connected party did not properly respond after ! 546: * a period of time (the timeout period is dependent on the transport ! 547: * protocol). ! 548: */ ! 549: #define ECONNREFUSED 146 ! 550: /* ! 551: * PRM, DDI/DKI: Connection refused. No connection could be made ! 552: * because the target machine actively refused it. This usually ! 553: * results from trying to connect to a service that is inactive on the ! 554: * remote host. ! 555: */ ! 556: #define EHOSTDOWN 147 ! 557: /* ! 558: * PRM, DDI/DKI: Host is down. A transport provider operation failed ! 559: * because the destination host was down. ! 560: */ ! 561: #define EHOSTUNREACH 148 ! 562: /* ! 563: * PRM, DDI/DKI: No route to host. A transport provider operation was ! 564: * attempted to an unreachable host. ! 565: */ ! 566: #define EALREADY 149 ! 567: /* ! 568: * PRM, DDI/DKI: Operation already in progress. An operation was ! 569: * attempted on a non-blocking object that already had an operation in ! 570: * progress. ! 571: */ ! 572: #define EINPROGRESS 150 ! 573: /* ! 574: * PRM, DDI/DKI: Operation now in progress. An operation that takes a ! 575: * long time to complete (such as a connect) was attempted on a non- ! 576: * blocking object. ! 577: */ ! 578: #define ESTALE 151 ! 579: /* ! 580: * PRM: Stale NFS file handle. ! 581: */ ! 582: ! 583: ! 584: #endif /* ! defined (__SYS_ERRNO_H__) */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.