1e7f40b6aSdist /* 2bac379f5Sbostic * Copyright (c) 1982, 1985, 1993 3bac379f5Sbostic * The Regents of the University of California. All rights reserved. 490db3a6bSbostic * 5b781ce73Sbostic * %sccs.include.redist.c% 6e7f40b6aSdist */ 7e7f40b6aSdist 807116fd4Sdonn #if defined(LIBC_SCCS) && !defined(lint) 9*3da411edSbostic static char sccsid[] = "@(#)errlst.c 8.2 (Berkeley) 11/16/93"; 1090db3a6bSbostic #endif /* LIBC_SCCS and not lint */ 11e7f40b6aSdist 12cfa58ae3Sralph #include <stdio.h> 13bb9247cdSbostic 14cfa58ae3Sralph const char *const sys_errlist[] = { 15fac1e818Sbostic "Undefined error: 0", /* 0 - ENOERROR */ 16fac1e818Sbostic "Operation not permitted", /* 1 - EPERM */ 174efc6a79Sroot "No such file or directory", /* 2 - ENOENT */ 184efc6a79Sroot "No such process", /* 3 - ESRCH */ 194efc6a79Sroot "Interrupted system call", /* 4 - EINTR */ 20fac1e818Sbostic "Input/output error", /* 5 - EIO */ 21fac1e818Sbostic "Device not configured", /* 6 - ENXIO */ 22fac1e818Sbostic "Argument list too long", /* 7 - E2BIG */ 234efc6a79Sroot "Exec format error", /* 8 - ENOEXEC */ 24fac1e818Sbostic "Bad file descriptor", /* 9 - EBADF */ 25fac1e818Sbostic "No child processes", /* 10 - ECHILD */ 26fac1e818Sbostic "Resource deadlock avoided", /* 11 - EDEADLK */ 27fac1e818Sbostic "Cannot allocate memory", /* 12 - ENOMEM */ 284efc6a79Sroot "Permission denied", /* 13 - EACCES */ 294efc6a79Sroot "Bad address", /* 14 - EFAULT */ 304efc6a79Sroot "Block device required", /* 15 - ENOTBLK */ 3143b02c9bSkarels "Device busy", /* 16 - EBUSY */ 324efc6a79Sroot "File exists", /* 17 - EEXIST */ 334efc6a79Sroot "Cross-device link", /* 18 - EXDEV */ 34fac1e818Sbostic "Operation not supported by device", /* 19 - ENODEV */ 354efc6a79Sroot "Not a directory", /* 20 - ENOTDIR */ 364efc6a79Sroot "Is a directory", /* 21 - EISDIR */ 374efc6a79Sroot "Invalid argument", /* 22 - EINVAL */ 38fac1e818Sbostic "Too many open files in system", /* 23 - ENFILE */ 394efc6a79Sroot "Too many open files", /* 24 - EMFILE */ 4043b02c9bSkarels "Inappropriate ioctl for device", /* 25 - ENOTTY */ 414efc6a79Sroot "Text file busy", /* 26 - ETXTBSY */ 424efc6a79Sroot "File too large", /* 27 - EFBIG */ 434efc6a79Sroot "No space left on device", /* 28 - ENOSPC */ 444efc6a79Sroot "Illegal seek", /* 29 - ESPIPE */ 454efc6a79Sroot "Read-only file system", /* 30 - EROFS */ 464efc6a79Sroot "Too many links", /* 31 - EMLINK */ 474efc6a79Sroot "Broken pipe", /* 32 - EPIPE */ 484efc6a79Sroot 494efc6a79Sroot /* math software */ 50fac1e818Sbostic "Numerical argument out of domain", /* 33 - EDOM */ 51ac4b8db5Sbostic "Result too large", /* 34 - ERANGE */ 524efc6a79Sroot 534efc6a79Sroot /* non-blocking and interrupt i/o */ 54fac1e818Sbostic "Resource temporarily unavailable", /* 35 - EAGAIN */ 55fac1e818Sbostic /* 35 - EWOULDBLOCK */ 564efc6a79Sroot "Operation now in progress", /* 36 - EINPROGRESS */ 574efc6a79Sroot "Operation already in progress", /* 37 - EALREADY */ 584efc6a79Sroot 59fac1e818Sbostic /* ipc/network software -- argument errors */ 604efc6a79Sroot "Socket operation on non-socket", /* 38 - ENOTSOCK */ 614efc6a79Sroot "Destination address required", /* 39 - EDESTADDRREQ */ 624efc6a79Sroot "Message too long", /* 40 - EMSGSIZE */ 634efc6a79Sroot "Protocol wrong type for socket", /* 41 - EPROTOTYPE */ 64fac1e818Sbostic "Protocol not available", /* 42 - ENOPROTOOPT */ 654efc6a79Sroot "Protocol not supported", /* 43 - EPROTONOSUPPORT */ 664efc6a79Sroot "Socket type not supported", /* 44 - ESOCKTNOSUPPORT */ 675ff5e973Smckusick "Operation not supported", /* 45 - EOPNOTSUPP */ 684efc6a79Sroot "Protocol family not supported", /* 46 - EPFNOSUPPORT */ 694efc6a79Sroot /* 47 - EAFNOSUPPORT */ 70fac1e818Sbostic "Address family not supported by protocol family", 714efc6a79Sroot "Address already in use", /* 48 - EADDRINUSE */ 724efc6a79Sroot "Can't assign requested address", /* 49 - EADDRNOTAVAIL */ 734efc6a79Sroot 74fac1e818Sbostic /* ipc/network software -- operational errors */ 754efc6a79Sroot "Network is down", /* 50 - ENETDOWN */ 764efc6a79Sroot "Network is unreachable", /* 51 - ENETUNREACH */ 774efc6a79Sroot "Network dropped connection on reset", /* 52 - ENETRESET */ 784efc6a79Sroot "Software caused connection abort", /* 53 - ECONNABORTED */ 794efc6a79Sroot "Connection reset by peer", /* 54 - ECONNRESET */ 804efc6a79Sroot "No buffer space available", /* 55 - ENOBUFS */ 814efc6a79Sroot "Socket is already connected", /* 56 - EISCONN */ 824efc6a79Sroot "Socket is not connected", /* 57 - ENOTCONN */ 834efc6a79Sroot "Can't send after socket shutdown", /* 58 - ESHUTDOWN */ 84fac1e818Sbostic "Too many references: can't splice", /* 59 - ETOOMANYREFS */ 85*3da411edSbostic "Operation timed out", /* 60 - ETIMEDOUT */ 8690db3a6bSbostic "Connection refused", /* 61 - ECONNREFUSED */ 87fac1e818Sbostic 88ae59ba13Sroot "Too many levels of symbolic links", /* 62 - ELOOP */ 89ae59ba13Sroot "File name too long", /* 63 - ENAMETOOLONG */ 90fac1e818Sbostic 91fac1e818Sbostic /* should be rearranged */ 92dca251f7Ssam "Host is down", /* 64 - EHOSTDOWN */ 93fac1e818Sbostic "No route to host", /* 65 - EHOSTUNREACH */ 94217a3543Ssam "Directory not empty", /* 66 - ENOTEMPTY */ 95fac1e818Sbostic 96fac1e818Sbostic /* quotas & mush */ 97217a3543Ssam "Too many processes", /* 67 - EPROCLIM */ 98217a3543Ssam "Too many users", /* 68 - EUSERS */ 99217a3543Ssam "Disc quota exceeded", /* 69 - EDQUOT */ 100fac1e818Sbostic 101fac1e818Sbostic /* Network File System */ 102fac1e818Sbostic "Stale NFS file handle", /* 70 - ESTALE */ 103fac1e818Sbostic "Too many levels of remote in path", /* 71 - EREMOTE */ 104fac1e818Sbostic "RPC struct is bad", /* 72 - EBADRPC */ 105fac1e818Sbostic "RPC version wrong", /* 73 - ERPCMISMATCH */ 106fac1e818Sbostic "RPC prog. not avail", /* 74 - EPROGUNAVAIL */ 107fac1e818Sbostic "Program version wrong", /* 75 - EPROGMISMATCH */ 108fac1e818Sbostic "Bad procedure for program", /* 76 - EPROCUNAVAIL */ 109fac1e818Sbostic 110fac1e818Sbostic "No locks available", /* 77 - ENOLCK */ 111fac1e818Sbostic "Function not implemented", /* 78 - ENOSYS */ 1129b5921b3Sbostic "Inappropriate file type or format", /* 79 - EFTYPE */ 1134c61b499Swnj }; 114cc7229c0Sbostic int errno; 115bb9247cdSbostic const int sys_nerr = sizeof(sys_errlist) / sizeof(sys_errlist[0]); 116