1 //===-- Map of POSIX error numbers to strings -------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIBC_SRC___SUPPORT_STRING_UTIL_TABLES_POSIX_ERRORS_H
10 #define LLVM_LIBC_SRC___SUPPORT_STRING_UTIL_TABLES_POSIX_ERRORS_H
12 #include "src/__support/StringUtil/message_mapper.h"
14 #include <errno.h> // For error macros
16 namespace LIBC_NAMESPACE
{
18 LIBC_INLINE_VAR
constexpr MsgTable
<76> POSIX_ERRORS
= {
19 MsgMapping(EPERM
, "Operation not permitted"),
20 MsgMapping(ENOENT
, "No such file or directory"),
21 MsgMapping(ESRCH
, "No such process"),
22 MsgMapping(EINTR
, "Interrupted system call"),
23 MsgMapping(EIO
, "Input/output error"),
24 MsgMapping(ENXIO
, "No such device or address"),
25 MsgMapping(E2BIG
, "Argument list too long"),
26 MsgMapping(ENOEXEC
, "Exec format error"),
27 MsgMapping(EBADF
, "Bad file descriptor"),
28 MsgMapping(ECHILD
, "No child processes"),
29 MsgMapping(EAGAIN
, "Resource temporarily unavailable"),
30 MsgMapping(ENOMEM
, "Cannot allocate memory"),
31 MsgMapping(EACCES
, "Permission denied"),
32 MsgMapping(EFAULT
, "Bad address"),
33 MsgMapping(EBUSY
, "Device or resource busy"),
34 MsgMapping(EEXIST
, "File exists"),
35 MsgMapping(EXDEV
, "Invalid cross-device link"),
36 MsgMapping(ENODEV
, "No such device"),
37 MsgMapping(ENOTDIR
, "Not a directory"),
38 MsgMapping(EISDIR
, "Is a directory"),
39 MsgMapping(EINVAL
, "Invalid argument"),
40 MsgMapping(ENFILE
, "Too many open files in system"),
41 MsgMapping(EMFILE
, "Too many open files"),
42 MsgMapping(ENOTTY
, "Inappropriate ioctl for device"),
43 MsgMapping(ETXTBSY
, "Text file busy"),
44 MsgMapping(EFBIG
, "File too large"),
45 MsgMapping(ENOSPC
, "No space left on device"),
46 MsgMapping(ESPIPE
, "Illegal seek"),
47 MsgMapping(EROFS
, "Read-only file system"),
48 MsgMapping(EMLINK
, "Too many links"),
49 MsgMapping(EPIPE
, "Broken pipe"),
50 MsgMapping(EDEADLK
, "Resource deadlock avoided"),
51 MsgMapping(ENAMETOOLONG
, "File name too long"),
52 MsgMapping(ENOLCK
, "No locks available"),
53 MsgMapping(ENOSYS
, "Function not implemented"),
54 MsgMapping(ENOTEMPTY
, "Directory not empty"),
55 MsgMapping(ELOOP
, "Too many levels of symbolic links"),
56 MsgMapping(ENOMSG
, "No message of desired type"),
57 MsgMapping(EIDRM
, "Identifier removed"),
58 MsgMapping(ENOSTR
, "Device not a stream"),
59 MsgMapping(ENODATA
, "No data available"),
60 MsgMapping(ETIME
, "Timer expired"),
61 MsgMapping(ENOSR
, "Out of streams resources"),
62 MsgMapping(ENOLINK
, "Link has been severed"),
63 MsgMapping(EPROTO
, "Protocol error"),
64 MsgMapping(EMULTIHOP
, "Multihop attempted"),
65 MsgMapping(EBADMSG
, "Bad message"),
66 MsgMapping(EOVERFLOW
, "Value too large for defined data type"),
67 MsgMapping(ENOTSOCK
, "Socket operation on non-socket"),
68 MsgMapping(EDESTADDRREQ
, "Destination address required"),
69 MsgMapping(EMSGSIZE
, "Message too long"),
70 MsgMapping(EPROTOTYPE
, "Protocol wrong type for socket"),
71 MsgMapping(ENOPROTOOPT
, "Protocol not available"),
72 MsgMapping(EPROTONOSUPPORT
, "Protocol not supported"),
73 MsgMapping(ENOTSUP
, "Operation not supported"),
74 MsgMapping(EAFNOSUPPORT
, "Address family not supported by protocol"),
75 MsgMapping(EADDRINUSE
, "Address already in use"),
76 MsgMapping(EADDRNOTAVAIL
, "Cannot assign requested address"),
77 MsgMapping(ENETDOWN
, "Network is down"),
78 MsgMapping(ENETUNREACH
, "Network is unreachable"),
79 MsgMapping(ENETRESET
, "Network dropped connection on reset"),
80 MsgMapping(ECONNABORTED
, "Software caused connection abort"),
81 MsgMapping(ECONNRESET
, "Connection reset by peer"),
82 MsgMapping(ENOBUFS
, "No buffer space available"),
83 MsgMapping(EISCONN
, "Transport endpoint is already connected"),
84 MsgMapping(ENOTCONN
, "Transport endpoint is not connected"),
85 MsgMapping(ETIMEDOUT
, "Connection timed out"),
86 MsgMapping(ECONNREFUSED
, "Connection refused"),
87 MsgMapping(EHOSTUNREACH
, "No route to host"),
88 MsgMapping(EALREADY
, "Operation already in progress"),
89 MsgMapping(EINPROGRESS
, "Operation now in progress"),
90 MsgMapping(ESTALE
, "Stale file handle"),
91 MsgMapping(EDQUOT
, "Disk quota exceeded"),
92 MsgMapping(ECANCELED
, "Operation canceled"),
93 MsgMapping(EOWNERDEAD
, "Owner died"),
94 MsgMapping(ENOTRECOVERABLE
, "State not recoverable"),
97 } // namespace LIBC_NAMESPACE
99 #endif // LLVM_LIBC_SRC___SUPPORT_STRING_UTIL_TABLES_POSIX_ERRORS_H