1 /* 2 * Copyright (c) 1982, 1986, 1989 Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are permitted 6 * provided that the above copyright notice and this paragraph are 7 * duplicated in all such forms and that any documentation, 8 * advertising materials, and other materials related to such 9 * distribution and use acknowledge that the software was developed 10 * by the University of California, Berkeley. The name of the 11 * University may not be used to endorse or promote products derived 12 * from this software without specific prior written permission. 13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16 * 17 * @(#)errno.h 7.8 (Berkeley) 04/04/90 18 */ 19 20 #define EPERM 1 /* Operation not permitted */ 21 #define ENOENT 2 /* No such file or directory */ 22 #define ESRCH 3 /* No such process */ 23 #define EINTR 4 /* Interrupted system call */ 24 #define EIO 5 /* Input/output error */ 25 #define ENXIO 6 /* Device not configured */ 26 #define E2BIG 7 /* Argument list too long */ 27 #define ENOEXEC 8 /* Exec format error */ 28 #define EBADF 9 /* Bad file descriptor */ 29 #define ECHILD 10 /* No child processes */ 30 #define EDEADLK 11 /* Resource deadlock avoided */ 31 /* 11 was EAGAIN */ 32 #define ENOMEM 12 /* Cannot allocate memory */ 33 #define EACCES 13 /* Permission denied */ 34 #define EFAULT 14 /* Bad address */ 35 #ifndef _POSIX_SOURCE 36 #define ENOTBLK 15 /* Block device required */ 37 #define EBUSY 16 /* Device busy */ 38 #endif 39 #define EEXIST 17 /* File exists */ 40 #define EXDEV 18 /* Cross-device link */ 41 #define ENODEV 19 /* Operation not supported by device */ 42 #define ENOTDIR 20 /* Not a directory */ 43 #define EISDIR 21 /* Is a directory */ 44 #define EINVAL 22 /* Invalid argument */ 45 #define ENFILE 23 /* Too many open files in system */ 46 #define EMFILE 24 /* Too many open files */ 47 #define ENOTTY 25 /* Inappropriate ioctl for device */ 48 #ifndef _POSIX_SOURCE 49 #define ETXTBSY 26 /* Text file busy */ 50 #endif 51 #define EFBIG 27 /* File too large */ 52 #define ENOSPC 28 /* No space left on device */ 53 #define ESPIPE 29 /* Illegal seek */ 54 #define EROFS 30 /* Read-only file system */ 55 #define EMLINK 31 /* Too many links */ 56 #define EPIPE 32 /* Broken pipe */ 57 58 /* math software */ 59 #define EDOM 33 /* Numerical argument out of domain */ 60 #define ERANGE 34 /* Numerical result out of range */ 61 62 /* non-blocking and interrupt i/o */ 63 #define EAGAIN 35 /* Resource temporarily unavailable */ 64 #ifndef _POSIX_SOURCE 65 #define EWOULDBLOCK EAGAIN /* Operation would block */ 66 #define EINPROGRESS 36 /* Operation now in progress */ 67 #define EALREADY 37 /* Operation already in progress */ 68 69 /* ipc/network software -- argument errors */ 70 #define ENOTSOCK 38 /* Socket operation on non-socket */ 71 #define EDESTADDRREQ 39 /* Destination address required */ 72 #define EMSGSIZE 40 /* Message too long */ 73 #define EPROTOTYPE 41 /* Protocol wrong type for socket */ 74 #define ENOPROTOOPT 42 /* Protocol not available */ 75 #define EPROTONOSUPPORT 43 /* Protocol not supported */ 76 #define ESOCKTNOSUPPORT 44 /* Socket type not supported */ 77 #define EOPNOTSUPP 45 /* Operation not supported on socket */ 78 #define EPFNOSUPPORT 46 /* Protocol family not supported */ 79 #define EAFNOSUPPORT 47 /* Address family not supported by protocol family */ 80 #define EADDRINUSE 48 /* Address already in use */ 81 #define EADDRNOTAVAIL 49 /* Can't assign requested address */ 82 83 /* ipc/network software -- operational errors */ 84 #define ENETDOWN 50 /* Network is down */ 85 #define ENETUNREACH 51 /* Network is unreachable */ 86 #define ENETRESET 52 /* Network dropped connection on reset */ 87 #define ECONNABORTED 53 /* Software caused connection abort */ 88 #define ECONNRESET 54 /* Connection reset by peer */ 89 #define ENOBUFS 55 /* No buffer space available */ 90 #define EISCONN 56 /* Socket is already connected */ 91 #define ENOTCONN 57 /* Socket is not connected */ 92 #define ESHUTDOWN 58 /* Can't send after socket shutdown */ 93 #define ETOOMANYREFS 59 /* Too many references: can't splice */ 94 #define ETIMEDOUT 60 /* Connection timed out */ 95 #define ECONNREFUSED 61 /* Connection refused */ 96 97 #define ELOOP 62 /* Too many levels of symbolic links */ 98 #endif /* _POSIX_SOURCE */ 99 #define ENAMETOOLONG 63 /* File name too long */ 100 101 /* should be rearranged */ 102 #ifndef _POSIX_SOURCE 103 #define EHOSTDOWN 64 /* Host is down */ 104 #define EHOSTUNREACH 65 /* No route to host */ 105 #endif /* _POSIX_SOURCE */ 106 #define ENOTEMPTY 66 /* Directory not empty */ 107 108 /* quotas & mush */ 109 #ifndef _POSIX_SOURCE 110 #define EPROCLIM 67 /* Too many processes */ 111 #define EUSERS 68 /* Too many users */ 112 #define EDQUOT 69 /* Disc quota exceeded */ 113 114 /* Network File System */ 115 #define ESTALE 70 /* Stale NFS file handle */ 116 #define EREMOTE 71 /* Too many levels of remote in path */ 117 #define EBADRPC 72 /* RPC struct is bad */ 118 #define ERPCMISMATCH 73 /* RPC version wrong */ 119 #define EPROGUNAVAIL 74 /* RPC prog. not avail */ 120 #define EPROGMISMATCH 75 /* Program version wrong */ 121 #define EPROCUNAVAIL 76 /* Bad procedure for program */ 122 #endif /* _POSIX_SOURCE */ 123 124 #define ENOLCK 77 /* No locks available */ 125 #define ENOSYS 78 /* Function not implemented */ 126 127 #ifdef KERNEL 128 /* pseudo-errors returned inside kernel to modify return to process */ 129 #define ERESTART -1 /* restart syscall */ 130 #define EJUSTRETURN -2 /* don't modify regs, just return */ 131 #endif 132