1 //===-- Map of Linux extension error numbers to strings ---------*- C++ -*-===// 2 // 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 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_TABLES_LINUX_EXTENSION_ERRORS_H 10 #define LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_TABLES_LINUX_EXTENSION_ERRORS_H 11 12 #include "src/__support/StringUtil/message_mapper.h" 13 #include "src/__support/macros/config.h" 14 #include "src/errno/libc_errno.h" 15 16 namespace LIBC_NAMESPACE_DECL { 17 18 constexpr MsgTable<52> LINUX_ERRORS = { 19 MsgMapping(ENOTBLK, "Block device required"), 20 MsgMapping(ECHRNG, "Channel number out of range"), 21 MsgMapping(EL2NSYNC, "Level 2 not synchronized"), 22 MsgMapping(EL3HLT, "Level 3 halted"), 23 MsgMapping(EL3RST, "Level 3 reset"), 24 MsgMapping(ELNRNG, "Link number out of range"), 25 MsgMapping(EUNATCH, "Protocol driver not attached"), 26 MsgMapping(ENOCSI, "No CSI structure available"), 27 MsgMapping(EL2HLT, "Level 2 halted"), 28 MsgMapping(EBADE, "Invalid exchange"), 29 MsgMapping(EBADR, "Invalid request descriptor"), 30 MsgMapping(EXFULL, "Exchange full"), 31 MsgMapping(ENOANO, "No anode"), 32 MsgMapping(EBADRQC, "Invalid request code"), 33 MsgMapping(EBADSLT, "Invalid slot"), 34 MsgMapping(EBFONT, "Bad font file format"), 35 MsgMapping(ENONET, "Machine is not on the network"), 36 MsgMapping(ENOPKG, "Package not installed"), 37 MsgMapping(EREMOTE, "Object is remote"), 38 MsgMapping(EADV, "Advertise error"), 39 MsgMapping(ESRMNT, "Srmount error"), 40 MsgMapping(ECOMM, "Communication error on send"), 41 MsgMapping(EDOTDOT, "RFS specific error"), 42 MsgMapping(ENOTUNIQ, "Name not unique on network"), 43 MsgMapping(EBADFD, "File descriptor in bad state"), 44 MsgMapping(EREMCHG, "Remote address changed"), 45 MsgMapping(ELIBACC, "Can not access a needed shared library"), 46 MsgMapping(ELIBBAD, "Accessing a corrupted shared library"), 47 MsgMapping(ELIBSCN, ".lib section in a.out corrupted"), 48 MsgMapping(ELIBMAX, "Attempting to link in too many shared libraries"), 49 MsgMapping(ELIBEXEC, "Cannot exec a shared library directly"), 50 MsgMapping(ERESTART, "Interrupted system call should be restarted"), 51 MsgMapping(ESTRPIPE, "Streams pipe error"), 52 MsgMapping(EUSERS, "Too many users"), 53 MsgMapping(ESOCKTNOSUPPORT, "Socket type not supported"), 54 MsgMapping(EPFNOSUPPORT, "Protocol family not supported"), 55 MsgMapping(ESHUTDOWN, "Cannot send after transport endpoint shutdown"), 56 MsgMapping(ETOOMANYREFS, "Too many references: cannot splice"), 57 MsgMapping(EHOSTDOWN, "Host is down"), 58 MsgMapping(EUCLEAN, "Structure needs cleaning"), 59 MsgMapping(ENOTNAM, "Not a XENIX named type file"), 60 MsgMapping(ENAVAIL, "No XENIX semaphores available"), 61 MsgMapping(EISNAM, "Is a named type file"), 62 MsgMapping(EREMOTEIO, "Remote I/O error"), 63 MsgMapping(ENOMEDIUM, "No medium found"), 64 MsgMapping(EMEDIUMTYPE, "Wrong medium type"), 65 MsgMapping(ENOKEY, "Required key not available"), 66 MsgMapping(EKEYEXPIRED, "Key has expired"), 67 MsgMapping(EKEYREVOKED, "Key has been revoked"), 68 MsgMapping(EKEYREJECTED, "Key was rejected by service"), 69 MsgMapping(ERFKILL, "Operation not possible due to RF-kill"), 70 MsgMapping(EHWPOISON, "Memory page has hardware error"), 71 }; 72 73 constexpr MsgTable<52> LINUX_ERRNO_NAMES = { 74 MsgMapping(ENOTBLK, "ENOTBLK"), 75 MsgMapping(ECHRNG, "ECHRNG"), 76 MsgMapping(EL2NSYNC, "EL2NSYNC"), 77 MsgMapping(EL3HLT, "EL3HLT"), 78 MsgMapping(EL3RST, "EL3RST"), 79 MsgMapping(ELNRNG, "ELNRNG"), 80 MsgMapping(EUNATCH, "EUNATCH"), 81 MsgMapping(ENOCSI, "ENOCSI"), 82 MsgMapping(EL2HLT, "EL2HLT"), 83 MsgMapping(EBADE, "EBADE"), 84 MsgMapping(EBADR, "EBADR"), 85 MsgMapping(EXFULL, "EXFULL"), 86 MsgMapping(ENOANO, "ENOANO"), 87 MsgMapping(EBADRQC, "EBADRQC"), 88 MsgMapping(EBADSLT, "EBADSLT"), 89 MsgMapping(EBFONT, "EBFONT"), 90 MsgMapping(ENONET, "ENONET"), 91 MsgMapping(ENOPKG, "ENOPKG"), 92 MsgMapping(EREMOTE, "EREMOTE"), 93 MsgMapping(EADV, "EADV"), 94 MsgMapping(ESRMNT, "ESRMNT"), 95 MsgMapping(ECOMM, "ECOMM"), 96 MsgMapping(EDOTDOT, "EDOTDOT"), 97 MsgMapping(ENOTUNIQ, "ENOTUNIQ"), 98 MsgMapping(EBADFD, "EBADFD"), 99 MsgMapping(EREMCHG, "EREMCHG"), 100 MsgMapping(ELIBACC, "ELIBACC"), 101 MsgMapping(ELIBBAD, "ELIBBAD"), 102 MsgMapping(ELIBSCN, "ELIBSCN"), 103 MsgMapping(ELIBMAX, "ELIBMAX"), 104 MsgMapping(ELIBEXEC, "ELIBEXEC"), 105 MsgMapping(ERESTART, "ERESTART"), 106 MsgMapping(ESTRPIPE, "ESTRPIPE"), 107 MsgMapping(EUSERS, "EUSERS"), 108 MsgMapping(ESOCKTNOSUPPORT, "ESOCKTNOSUPPORT"), 109 MsgMapping(EPFNOSUPPORT, "EPFNOSUPPORT"), 110 MsgMapping(ESHUTDOWN, "ESHUTDOWN"), 111 MsgMapping(ETOOMANYREFS, "ETOOMANYREFS"), 112 MsgMapping(EHOSTDOWN, "EHOSTDOWN"), 113 MsgMapping(EUCLEAN, "EUCLEAN"), 114 MsgMapping(ENOTNAM, "ENOTNAM"), 115 MsgMapping(ENAVAIL, "ENAVAIL"), 116 MsgMapping(EISNAM, "EISNAM"), 117 MsgMapping(EREMOTEIO, "EREMOTEIO"), 118 MsgMapping(ENOMEDIUM, "ENOMEDIUM"), 119 MsgMapping(EMEDIUMTYPE, "EMEDIUMTYPE"), 120 MsgMapping(ENOKEY, "ENOKEY"), 121 MsgMapping(EKEYEXPIRED, "EKEYEXPIRED"), 122 MsgMapping(EKEYREVOKED, "EKEYREVOKED"), 123 MsgMapping(EKEYREJECTED, "EKEYREJECTED"), 124 MsgMapping(ERFKILL, "ERFKILL"), 125 MsgMapping(EHWPOISON, "EHWPOISON"), 126 }; 127 128 } // namespace LIBC_NAMESPACE_DECL 129 130 #endif // LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_TABLES_LINUX_EXTENSION_ERRORS_H 131