11573Srgrimes/* 21573Srgrimes * Copyright (c) 1982, 1985, 1993 31573Srgrimes * The Regents of the University of California. All rights reserved. 41573Srgrimes * 51573Srgrimes * Redistribution and use in source and binary forms, with or without 61573Srgrimes * modification, are permitted provided that the following conditions 71573Srgrimes * are met: 81573Srgrimes * 1. Redistributions of source code must retain the above copyright 91573Srgrimes * notice, this list of conditions and the following disclaimer. 101573Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 111573Srgrimes * notice, this list of conditions and the following disclaimer in the 121573Srgrimes * documentation and/or other materials provided with the distribution. 131573Srgrimes * 4. Neither the name of the University nor the names of its contributors 141573Srgrimes * may be used to endorse or promote products derived from this software 151573Srgrimes * without specific prior written permission. 161573Srgrimes * 171573Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 181573Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 191573Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 201573Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 211573Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 221573Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 231573Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 241573Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 251573Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 261573Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 271573Srgrimes * SUCH DAMAGE. 281573Srgrimes */ 291573Srgrimes 301573Srgrimes#if defined(LIBC_SCCS) && !defined(lint) 311573Srgrimesstatic char sccsid[] = "@(#)errlst.c 8.2 (Berkeley) 11/16/93"; 321573Srgrimes#endif /* LIBC_SCCS and not lint */ 3392986Sobrien#include <sys/cdefs.h> 3492986Sobrien__FBSDID("$FreeBSD: releng/10.3/lib/libc/gen/errlst.c 255108 2013-08-31 22:32:42Z jilles $"); 351573Srgrimes 361573Srgrimes#include <stdio.h> 37255108Sjilles#include "errlst.h" 381573Srgrimes 391573Srgrimesconst char *const sys_errlist[] = { 40220376Sjilles "No error: 0", /* 0 - ENOERROR */ 411573Srgrimes "Operation not permitted", /* 1 - EPERM */ 421573Srgrimes "No such file or directory", /* 2 - ENOENT */ 431573Srgrimes "No such process", /* 3 - ESRCH */ 441573Srgrimes "Interrupted system call", /* 4 - EINTR */ 451573Srgrimes "Input/output error", /* 5 - EIO */ 461573Srgrimes "Device not configured", /* 6 - ENXIO */ 471573Srgrimes "Argument list too long", /* 7 - E2BIG */ 481573Srgrimes "Exec format error", /* 8 - ENOEXEC */ 491573Srgrimes "Bad file descriptor", /* 9 - EBADF */ 501573Srgrimes "No child processes", /* 10 - ECHILD */ 511573Srgrimes "Resource deadlock avoided", /* 11 - EDEADLK */ 521573Srgrimes "Cannot allocate memory", /* 12 - ENOMEM */ 531573Srgrimes "Permission denied", /* 13 - EACCES */ 541573Srgrimes "Bad address", /* 14 - EFAULT */ 551573Srgrimes "Block device required", /* 15 - ENOTBLK */ 561573Srgrimes "Device busy", /* 16 - EBUSY */ 571573Srgrimes "File exists", /* 17 - EEXIST */ 581573Srgrimes "Cross-device link", /* 18 - EXDEV */ 591573Srgrimes "Operation not supported by device", /* 19 - ENODEV */ 601573Srgrimes "Not a directory", /* 20 - ENOTDIR */ 611573Srgrimes "Is a directory", /* 21 - EISDIR */ 621573Srgrimes "Invalid argument", /* 22 - EINVAL */ 631573Srgrimes "Too many open files in system", /* 23 - ENFILE */ 641573Srgrimes "Too many open files", /* 24 - EMFILE */ 651573Srgrimes "Inappropriate ioctl for device", /* 25 - ENOTTY */ 661573Srgrimes "Text file busy", /* 26 - ETXTBSY */ 671573Srgrimes "File too large", /* 27 - EFBIG */ 681573Srgrimes "No space left on device", /* 28 - ENOSPC */ 691573Srgrimes "Illegal seek", /* 29 - ESPIPE */ 701573Srgrimes "Read-only file system", /* 30 - EROFS */ 711573Srgrimes "Too many links", /* 31 - EMLINK */ 721573Srgrimes "Broken pipe", /* 32 - EPIPE */ 731573Srgrimes 741573Srgrimes/* math software */ 751573Srgrimes "Numerical argument out of domain", /* 33 - EDOM */ 761573Srgrimes "Result too large", /* 34 - ERANGE */ 771573Srgrimes 781573Srgrimes/* non-blocking and interrupt i/o */ 791573Srgrimes "Resource temporarily unavailable", /* 35 - EAGAIN */ 801573Srgrimes /* 35 - EWOULDBLOCK */ 811573Srgrimes "Operation now in progress", /* 36 - EINPROGRESS */ 821573Srgrimes "Operation already in progress", /* 37 - EALREADY */ 831573Srgrimes 841573Srgrimes/* ipc/network software -- argument errors */ 851573Srgrimes "Socket operation on non-socket", /* 38 - ENOTSOCK */ 861573Srgrimes "Destination address required", /* 39 - EDESTADDRREQ */ 871573Srgrimes "Message too long", /* 40 - EMSGSIZE */ 881573Srgrimes "Protocol wrong type for socket", /* 41 - EPROTOTYPE */ 891573Srgrimes "Protocol not available", /* 42 - ENOPROTOOPT */ 901573Srgrimes "Protocol not supported", /* 43 - EPROTONOSUPPORT */ 911573Srgrimes "Socket type not supported", /* 44 - ESOCKTNOSUPPORT */ 921573Srgrimes "Operation not supported", /* 45 - EOPNOTSUPP */ 931573Srgrimes "Protocol family not supported", /* 46 - EPFNOSUPPORT */ 941573Srgrimes /* 47 - EAFNOSUPPORT */ 951573Srgrimes "Address family not supported by protocol family", 961573Srgrimes "Address already in use", /* 48 - EADDRINUSE */ 971573Srgrimes "Can't assign requested address", /* 49 - EADDRNOTAVAIL */ 981573Srgrimes 991573Srgrimes/* ipc/network software -- operational errors */ 1001573Srgrimes "Network is down", /* 50 - ENETDOWN */ 1011573Srgrimes "Network is unreachable", /* 51 - ENETUNREACH */ 1021573Srgrimes "Network dropped connection on reset", /* 52 - ENETRESET */ 1031573Srgrimes "Software caused connection abort", /* 53 - ECONNABORTED */ 1041573Srgrimes "Connection reset by peer", /* 54 - ECONNRESET */ 1051573Srgrimes "No buffer space available", /* 55 - ENOBUFS */ 1061573Srgrimes "Socket is already connected", /* 56 - EISCONN */ 1071573Srgrimes "Socket is not connected", /* 57 - ENOTCONN */ 1081573Srgrimes "Can't send after socket shutdown", /* 58 - ESHUTDOWN */ 1091573Srgrimes "Too many references: can't splice", /* 59 - ETOOMANYREFS */ 1101573Srgrimes "Operation timed out", /* 60 - ETIMEDOUT */ 1111573Srgrimes "Connection refused", /* 61 - ECONNREFUSED */ 1121573Srgrimes 1131573Srgrimes "Too many levels of symbolic links", /* 62 - ELOOP */ 1141573Srgrimes "File name too long", /* 63 - ENAMETOOLONG */ 1151573Srgrimes 1161573Srgrimes/* should be rearranged */ 1171573Srgrimes "Host is down", /* 64 - EHOSTDOWN */ 1181573Srgrimes "No route to host", /* 65 - EHOSTUNREACH */ 1191573Srgrimes "Directory not empty", /* 66 - ENOTEMPTY */ 1201573Srgrimes 1211573Srgrimes/* quotas & mush */ 1221573Srgrimes "Too many processes", /* 67 - EPROCLIM */ 1231573Srgrimes "Too many users", /* 68 - EUSERS */ 1241573Srgrimes "Disc quota exceeded", /* 69 - EDQUOT */ 1251573Srgrimes 1261573Srgrimes/* Network File System */ 1271573Srgrimes "Stale NFS file handle", /* 70 - ESTALE */ 1281573Srgrimes "Too many levels of remote in path", /* 71 - EREMOTE */ 1291573Srgrimes "RPC struct is bad", /* 72 - EBADRPC */ 1301573Srgrimes "RPC version wrong", /* 73 - ERPCMISMATCH */ 1311573Srgrimes "RPC prog. not avail", /* 74 - EPROGUNAVAIL */ 1321573Srgrimes "Program version wrong", /* 75 - EPROGMISMATCH */ 1331573Srgrimes "Bad procedure for program", /* 76 - EPROCUNAVAIL */ 1341573Srgrimes 1351573Srgrimes "No locks available", /* 77 - ENOLCK */ 1361573Srgrimes "Function not implemented", /* 78 - ENOSYS */ 1371573Srgrimes "Inappropriate file type or format", /* 79 - EFTYPE */ 13846018Sphk "Authentication error", /* 80 - EAUTH */ 13946018Sphk "Need authenticator", /* 81 - ENEEDAUTH */ 14046018Sphk "Identifier removed", /* 82 - EIDRM */ 14146018Sphk "No message of desired type", /* 83 - ENOMSG */ 14246018Sphk "Value too large to be stored in data type", /* 84 - EOVERFLOW */ 14346018Sphk "Operation canceled", /* 85 - ECANCELED */ 14446018Sphk "Illegal byte sequence", /* 86 - EILSEQ */ 14591814Sgreen "Attribute not found", /* 87 - ENOATTR */ 146101567Sphk 147101567Sphk/* General */ 148102229Sphk "Programming error", /* 88 - EDOOFUS */ 149144530Sdas 150144530Sdas "Bad message", /* 89 - EBADMSG */ 151144530Sdas "Multihop attempted", /* 90 - EMULTIHOP */ 152144530Sdas "Link has been severed", /* 91 - ENOLINK */ 153144530Sdas "Protocol error", /* 92 - EPROTO */ 154197841Srwatson "Capabilities insufficient", /* 93 - ENOTCAPABLE */ 155219222Srwatson "Not permitted in capability mode", /* 94 - ECAPMODE */ 156250250Spluknet "State not recoverable", /* 95 - ENOTRECOVERABLE */ 157250250Spluknet "Previous owner died", /* 96 - EOWNERDEAD */ 1581573Srgrimes}; 1591573Srgrimesconst int sys_nerr = sizeof(sys_errlist) / sizeof(sys_errlist[0]); 160255108Sjilles 161255108Sjilles#ifdef PIC 162255108Sjilles__strong_reference(sys_errlist, __hidden_sys_errlist); 163255108Sjilles__strong_reference(sys_nerr, __hidden_sys_nerr); 164255108Sjilles#endif 165