30 */ 31 32#include <sys/types.h> 33 34#include <config/config.h> 35 36#include <bsm/audit_errno.h> 37#include <bsm/libbsm.h> 38 39#include <errno.h> 40#include <string.h> 41 42/* 43 * Different operating systems use different numeric constants for different 44 * error numbers, and sometimes error numbers don't exist in more than one 45 * operating system. These routines convert between BSM and local error 46 * number spaces, subject to the above realities. BSM error numbers are 47 * stored in a single 8-bit character, so don't have a byte order. 48 * 49 * Don't include string definitions when this code is compiled into a kernel. 50 */ 51struct bsm_errno { 52 int be_bsm_errno; 53 int be_local_errno; 54#if !defined(KERNEL) && !defined(_KERNEL) 55 const char *be_strerror; 56#endif 57}; 58 59#define ERRNO_NO_LOCAL_MAPPING -600 60 61#if !defined(KERNEL) && !defined(_KERNEL) 62#define ES(x) x 63#else 64#define ES(x) 65#endif 66 67/* 68 * Mapping table -- please maintain in numeric sorted order with respect to 69 * the BSM constant. Today we do a linear lookup, but could switch to a 70 * binary search if it makes sense. We only ifdef errors that aren't 71 * generally available, but it does make the table a lot more ugly. 72 * 73 * XXXRW: It would be nice to have a similar ordered table mapping to BSM 74 * constant from local constant, but the order of local constants varies by 75 * OS. Really we need to build that table at compile-time but don't do that 76 * yet. 77 * 78 * XXXRW: We currently embed English-language error strings here, but should 79 * support catalogues; these are only used if the OS doesn't have an error 80 * string using strerror(3). 81 */ 82static const struct bsm_errno bsm_errnos[] = { 83 { BSM_ERRNO_ESUCCESS, 0, ES("Success") }, 84 { BSM_ERRNO_EPERM, EPERM, ES("Operation not permitted") }, 85 { BSM_ERRNO_ENOENT, ENOENT, ES("No such file or directory") }, 86 { BSM_ERRNO_ESRCH, ESRCH, ES("No such process") }, 87 { BSM_ERRNO_EINTR, EINTR, ES("Interrupted system call") }, 88 { BSM_ERRNO_EIO, EIO, ES("Input/output error") }, 89 { BSM_ERRNO_ENXIO, ENXIO, ES("Device not configured") }, 90 { BSM_ERRNO_E2BIG, E2BIG, ES("Argument list too long") }, 91 { BSM_ERRNO_ENOEXEC, ENOEXEC, ES("Exec format error") }, 92 { BSM_ERRNO_EBADF, EBADF, ES("Bad file descriptor") }, 93 { BSM_ERRNO_ECHILD, ECHILD, ES("No child processes") }, 94 { BSM_ERRNO_EAGAIN, EAGAIN, ES("Resource temporarily unavailable") }, 95 { BSM_ERRNO_ENOMEM, ENOMEM, ES("Cannot allocate memory") }, 96 { BSM_ERRNO_EACCES, EACCES, ES("Permission denied") }, 97 { BSM_ERRNO_EFAULT, EFAULT, ES("Bad address") }, 98 { BSM_ERRNO_ENOTBLK, ENOTBLK, ES("Block device required") }, 99 { BSM_ERRNO_EBUSY, EBUSY, ES("Device busy") }, 100 { BSM_ERRNO_EEXIST, EEXIST, ES("File exists") }, 101 { BSM_ERRNO_EXDEV, EXDEV, ES("Cross-device link") }, 102 { BSM_ERRNO_ENODEV, ENODEV, ES("Operation not supported by device") }, 103 { BSM_ERRNO_ENOTDIR, ENOTDIR, ES("Not a directory") }, 104 { BSM_ERRNO_EISDIR, EISDIR, ES("Is a directory") }, 105 { BSM_ERRNO_EINVAL, EINVAL, ES("Invalid argument") }, 106 { BSM_ERRNO_ENFILE, ENFILE, ES("Too many open files in system") }, 107 { BSM_ERRNO_EMFILE, EMFILE, ES("Too many open files") }, 108 { BSM_ERRNO_ENOTTY, ENOTTY, ES("Inappropriate ioctl for device") }, 109 { BSM_ERRNO_ETXTBSY, ETXTBSY, ES("Text file busy") }, 110 { BSM_ERRNO_EFBIG, EFBIG, ES("File too large") }, 111 { BSM_ERRNO_ENOSPC, ENOSPC, ES("No space left on device") }, 112 { BSM_ERRNO_ESPIPE, ESPIPE, ES("Illegal seek") }, 113 { BSM_ERRNO_EROFS, EROFS, ES("Read-only file system") }, 114 { BSM_ERRNO_EMLINK, EMLINK, ES("Too many links") }, 115 { BSM_ERRNO_EPIPE, EPIPE, ES("Broken pipe") }, 116 { BSM_ERRNO_EDOM, EDOM, ES("Numerical argument out of domain") }, 117 { BSM_ERRNO_ERANGE, ERANGE, ES("Result too large") }, 118 { BSM_ERRNO_ENOMSG, ENOMSG, ES("No message of desired type") }, 119 { BSM_ERRNO_EIDRM, EIDRM, ES("Identifier removed") }, 120 { BSM_ERRNO_ECHRNG, 121#ifdef ECHRNG 122 ECHRNG, 123#else 124 ERRNO_NO_LOCAL_MAPPING, 125#endif 126 ES("Channel number out of range") }, 127 { BSM_ERRNO_EL2NSYNC, 128#ifdef EL2NSYNC 129 EL2NSYNC, 130#else 131 ERRNO_NO_LOCAL_MAPPING, 132#endif 133 ES("Level 2 not synchronized") }, 134 { BSM_ERRNO_EL3HLT, 135#ifdef EL3HLT 136 EL3HLT, 137#else 138 ERRNO_NO_LOCAL_MAPPING, 139#endif 140 ES("Level 3 halted") }, 141 { BSM_ERRNO_EL3RST, 142#ifdef EL3RST 143 EL3RST, 144#else 145 ERRNO_NO_LOCAL_MAPPING, 146#endif 147 ES("Level 3 reset") }, 148 { BSM_ERRNO_ELNRNG, 149#ifdef ELNRNG 150 ELNRNG, 151#else 152 ERRNO_NO_LOCAL_MAPPING, 153#endif 154 ES("Link number out of range") }, 155 { BSM_ERRNO_EUNATCH, 156#ifdef EUNATCH 157 EUNATCH, 158#else 159 ERRNO_NO_LOCAL_MAPPING, 160#endif 161 ES("Protocol driver not attached") }, 162 { BSM_ERRNO_ENOCSI, 163#ifdef ENOCSI 164 ENOCSI, 165#else 166 ERRNO_NO_LOCAL_MAPPING, 167#endif 168 ES("No CSI structure available") }, 169 { BSM_ERRNO_EL2HLT, 170#ifdef EL2HLT 171 EL2HLT, 172#else 173 ERRNO_NO_LOCAL_MAPPING, 174#endif 175 ES("Level 2 halted") }, 176 { BSM_ERRNO_EDEADLK, EDEADLK, ES("Resource deadlock avoided") }, 177 { BSM_ERRNO_ENOLCK, ENOLCK, ES("No locks available") }, 178 { BSM_ERRNO_ECANCELED, ECANCELED, ES("Operation canceled") }, 179 { BSM_ERRNO_ENOTSUP, ENOTSUP, ES("Operation not supported") }, 180 { BSM_ERRNO_EDQUOT, EDQUOT, ES("Disc quota exceeded") }, 181 { BSM_ERRNO_EBADE, 182#ifdef EBADE 183 EBADE, 184#else 185 ERRNO_NO_LOCAL_MAPPING, 186#endif 187 ES("Invalid exchange") }, 188 { BSM_ERRNO_EBADR, 189#ifdef EBADR 190 EBADR, 191#else 192 ERRNO_NO_LOCAL_MAPPING, 193#endif 194 ES("Invalid request descriptor") }, 195 { BSM_ERRNO_EXFULL, 196#ifdef EXFULL 197 EXFULL, 198#else 199 ERRNO_NO_LOCAL_MAPPING, 200#endif 201 ES("Exchange full") }, 202 { BSM_ERRNO_ENOANO, 203#ifdef ENOANO 204 ENOANO, 205#else 206 ERRNO_NO_LOCAL_MAPPING, 207#endif 208 ES("No anode") }, 209 { BSM_ERRNO_EBADRQC, 210#ifdef EBADRQC 211 EBADRQC, 212#else 213 ERRNO_NO_LOCAL_MAPPING, 214#endif 215 ES("Invalid request descriptor") }, 216 { BSM_ERRNO_EBADSLT, 217#ifdef EBADSLT 218 EBADSLT, 219#else 220 ERRNO_NO_LOCAL_MAPPING, 221#endif 222 ES("Invalid slot") }, 223 { BSM_ERRNO_EDEADLOCK, 224#ifdef EDEADLOCK 225 EDEADLOCK, 226#else 227 ERRNO_NO_LOCAL_MAPPING, 228#endif 229 ES("Resource deadlock avoided") }, 230 { BSM_ERRNO_EBFONT, 231#ifdef EBFONT 232 EBFONT, 233#else 234 ERRNO_NO_LOCAL_MAPPING, 235#endif 236 ES("Bad font file format") }, 237 { BSM_ERRNO_EOWNERDEAD, 238#ifdef EOWNERDEAD 239 EOWNERDEAD, 240#else 241 ERRNO_NO_LOCAL_MAPPING, 242#endif 243 ES("Process died with the lock") }, 244 { BSM_ERRNO_ENOTRECOVERABLE, 245#ifdef ENOTRECOVERABLE 246 ENOTRECOVERABLE, 247#else 248 ERRNO_NO_LOCAL_MAPPING, 249#endif 250 ES("Lock is not recoverable") }, 251 { BSM_ERRNO_ENOSTR, 252#ifdef ENOSTR 253 ENOSTR, 254#else 255 ERRNO_NO_LOCAL_MAPPING, 256#endif 257 ES("Device not a stream") }, 258 { BSM_ERRNO_ENONET, 259#ifdef ENONET 260 ENONET, 261#else 262 ERRNO_NO_LOCAL_MAPPING, 263#endif 264 ES("Machine is not on the network") }, 265 { BSM_ERRNO_ENOPKG, 266#ifdef ENOPKG 267 ENOPKG, 268#else 269 ERRNO_NO_LOCAL_MAPPING, 270#endif 271 ES("Package not installed") }, 272 { BSM_ERRNO_EREMOTE, EREMOTE, 273 ES("Too many levels of remote in path") }, 274 { BSM_ERRNO_ENOLINK, 275#ifdef ENOLINK 276 ENOLINK, 277#else 278 ERRNO_NO_LOCAL_MAPPING, 279#endif 280 ES("Link has been severed") }, 281 { BSM_ERRNO_EADV, 282#ifdef EADV 283 EADV, 284#else 285 ERRNO_NO_LOCAL_MAPPING, 286#endif 287 ES("Advertise error") }, 288 { BSM_ERRNO_ESRMNT, 289#ifdef ESRMNT 290 ESRMNT, 291#else 292 ERRNO_NO_LOCAL_MAPPING, 293#endif 294 ES("srmount error") }, 295 { BSM_ERRNO_ECOMM, 296#ifdef ECOMM 297 ECOMM, 298#else 299 ERRNO_NO_LOCAL_MAPPING, 300#endif 301 ES("Communication error on send") }, 302 { BSM_ERRNO_EPROTO, 303#ifdef EPROTO 304 EPROTO, 305#else 306 ERRNO_NO_LOCAL_MAPPING, 307#endif 308 ES("Protocol error") }, 309 { BSM_ERRNO_ELOCKUNMAPPED, 310#ifdef ELOCKUNMAPPED 311 ELOCKUNMAPPED, 312#else 313 ERRNO_NO_LOCAL_MAPPING, 314#endif 315 ES("Locked lock was unmapped") }, 316 { BSM_ERRNO_ENOTACTIVE, 317#ifdef ENOTACTIVE 318 ENOTACTIVE, 319#else 320 ERRNO_NO_LOCAL_MAPPING, 321#endif 322 ES("Facility is not active") }, 323 { BSM_ERRNO_EMULTIHOP, 324#ifdef EMULTIHOP 325 EMULTIHOP, 326#else 327 ERRNO_NO_LOCAL_MAPPING, 328#endif 329 ES("Multihop attempted") }, 330 { BSM_ERRNO_EBADMSG, 331#ifdef EBADMSG 332 EBADMSG, 333#else 334 ERRNO_NO_LOCAL_MAPPING, 335#endif 336 ES("Bad message") }, 337 { BSM_ERRNO_ENAMETOOLONG, ENAMETOOLONG, ES("File name too long") }, 338 { BSM_ERRNO_EOVERFLOW, EOVERFLOW, 339 ES("Value too large to be stored in data type") }, 340 { BSM_ERRNO_ENOTUNIQ, 341#ifdef ENOTUNIQ 342 ENOTUNIQ, 343#else 344 ERRNO_NO_LOCAL_MAPPING, 345#endif 346 ES("Given log name not unique") }, 347 { BSM_ERRNO_EBADFD, 348#ifdef EBADFD 349 EBADFD, 350#else 351 ERRNO_NO_LOCAL_MAPPING, 352#endif 353 ES("Given f.d. invalid for this operation") }, 354 { BSM_ERRNO_EREMCHG, 355#ifdef EREMCHG 356 EREMCHG, 357#else 358 ERRNO_NO_LOCAL_MAPPING, 359#endif 360 ES("Remote address changed") }, 361 { BSM_ERRNO_ELIBACC, 362#ifdef ELIBACC 363 ELIBACC, 364#else 365 ERRNO_NO_LOCAL_MAPPING, 366#endif 367 ES("Can't access a needed shared lib") }, 368 { BSM_ERRNO_ELIBBAD, 369#ifdef ELIBBAD 370 ELIBBAD, 371#else 372 ERRNO_NO_LOCAL_MAPPING, 373#endif 374 ES("Accessing a corrupted shared lib") }, 375 { BSM_ERRNO_ELIBSCN, 376#ifdef ELIBSCN 377 ELIBSCN, 378#else 379 ERRNO_NO_LOCAL_MAPPING, 380#endif 381 ES(".lib section in a.out corrupted") }, 382 { BSM_ERRNO_ELIBMAX, 383#ifdef ELIBMAX 384 ELIBMAX, 385#else 386 ERRNO_NO_LOCAL_MAPPING, 387#endif 388 ES("Attempting to link in too many libs") }, 389 { BSM_ERRNO_ELIBEXEC, 390#ifdef ELIBEXEC 391 ELIBEXEC, 392#else 393 ERRNO_NO_LOCAL_MAPPING, 394#endif 395 ES("Attempting to exec a shared library") }, 396 { BSM_ERRNO_EILSEQ, EILSEQ, ES("Illegal byte sequence") }, 397 { BSM_ERRNO_ENOSYS, ENOSYS, ES("Function not implemented") }, 398 { BSM_ERRNO_ELOOP, ELOOP, ES("Too many levels of symbolic links") }, 399 { BSM_ERRNO_ERESTART, 400#ifdef ERESTART 401 ERESTART, 402#else 403 ERRNO_NO_LOCAL_MAPPING, 404#endif 405 ES("Restart syscall") }, 406 { BSM_ERRNO_ESTRPIPE, 407#ifdef ESTRPIPE 408 ESTRPIPE, 409#else 410 ERRNO_NO_LOCAL_MAPPING, 411#endif 412 ES("If pipe/FIFO, don't sleep in stream head") }, 413 { BSM_ERRNO_ENOTEMPTY, ENOTEMPTY, ES("Directory not empty") }, 414 { BSM_ERRNO_EUSERS, EUSERS, ES("Too many users") }, 415 { BSM_ERRNO_ENOTSOCK, ENOTSOCK, 416 ES("Socket operation on non-socket") }, 417 { BSM_ERRNO_EDESTADDRREQ, EDESTADDRREQ, 418 ES("Destination address required") }, 419 { BSM_ERRNO_EMSGSIZE, EMSGSIZE, ES("Message too long") }, 420 { BSM_ERRNO_EPROTOTYPE, EPROTOTYPE, 421 ES("Protocol wrong type for socket") }, 422 { BSM_ERRNO_ENOPROTOOPT, ENOPROTOOPT, ES("Protocol not available") }, 423 { BSM_ERRNO_EPROTONOSUPPORT, EPROTONOSUPPORT, 424 ES("Protocol not supported") }, 425 { BSM_ERRNO_ESOCKTNOSUPPORT, ESOCKTNOSUPPORT, 426 ES("Socket type not supported") }, 427 { BSM_ERRNO_EOPNOTSUPP, EOPNOTSUPP, ES("Operation not supported") }, 428 { BSM_ERRNO_EPFNOSUPPORT, EPFNOSUPPORT, 429 ES("Protocol family not supported") }, 430 { BSM_ERRNO_EAFNOSUPPORT, EAFNOSUPPORT, 431 ES("Address family not supported by protocol family") }, 432 { BSM_ERRNO_EADDRINUSE, EADDRINUSE, ES("Address already in use") }, 433 { BSM_ERRNO_EADDRNOTAVAIL, EADDRNOTAVAIL, 434 ES("Can't assign requested address") }, 435 { BSM_ERRNO_ENETDOWN, ENETDOWN, ES("Network is down") }, 436 { BSM_ERRNO_ENETRESET, ENETRESET, 437 ES("Network dropped connection on reset") }, 438 { BSM_ERRNO_ECONNABORTED, ECONNABORTED, 439 ES("Software caused connection abort") }, 440 { BSM_ERRNO_ECONNRESET, ECONNRESET, ES("Connection reset by peer") }, 441 { BSM_ERRNO_ENOBUFS, ENOBUFS, ES("No buffer space available") }, 442 { BSM_ERRNO_EISCONN, EISCONN, ES("Socket is already connected") }, 443 { BSM_ERRNO_ENOTCONN, ENOTCONN, ES("Socket is not connected") }, 444 { BSM_ERRNO_ESHUTDOWN, ESHUTDOWN, 445 ES("Can't send after socket shutdown") }, 446 { BSM_ERRNO_ETOOMANYREFS, ETOOMANYREFS, 447 ES("Too many references: can't splice") }, 448 { BSM_ERRNO_ETIMEDOUT, ETIMEDOUT, ES("Operation timed out") }, 449 { BSM_ERRNO_ECONNREFUSED, ECONNREFUSED, ES("Connection refused") }, 450 { BSM_ERRNO_EHOSTDOWN, EHOSTDOWN, ES("Host is down") }, 451 { BSM_ERRNO_EHOSTUNREACH, EHOSTUNREACH, ES("No route to host") }, 452 { BSM_ERRNO_EALREADY, EALREADY, ES("Operation already in progress") }, 453 { BSM_ERRNO_EINPROGRESS, EINPROGRESS, 454 ES("Operation now in progress") }, 455 { BSM_ERRNO_ESTALE, ESTALE, ES("Stale NFS file handle") }, 456 { BSM_ERRNO_EPWROFF, 457#ifdef EPWROFF 458 EPWROFF, 459#else 460 ERRNO_NO_LOCAL_MAPPING, 461#endif 462 ES("Device power is off") }, 463 { BSM_ERRNO_EDEVERR, 464#ifdef EDEVERR 465 EDEVERR, 466#else 467 ERRNO_NO_LOCAL_MAPPING, 468#endif 469 ES("Device error") }, 470 { BSM_ERRNO_EBADEXEC, 471#ifdef EBADEXEC 472 EBADEXEC, 473#else 474 ERRNO_NO_LOCAL_MAPPING, 475#endif 476 ES("Bad executable") }, 477 { BSM_ERRNO_EBADARCH, 478#ifdef EBADARCH 479 EBADARCH, 480#else 481 ERRNO_NO_LOCAL_MAPPING, 482#endif 483 ES("Bad CPU type in executable") }, 484 { BSM_ERRNO_ESHLIBVERS, 485#ifdef ESHLIBVERS 486 ESHLIBVERS, 487#else 488 ERRNO_NO_LOCAL_MAPPING, 489#endif 490 ES("Shared library version mismatch") }, 491 { BSM_ERRNO_EBADMACHO, 492#ifdef EBADMACHO 493 EBADMACHO, 494#else 495 ERRNO_NO_LOCAL_MAPPING, 496#endif
| 30 */ 31 32#include <sys/types.h> 33 34#include <config/config.h> 35 36#include <bsm/audit_errno.h> 37#include <bsm/libbsm.h> 38 39#include <errno.h> 40#include <string.h> 41 42/* 43 * Different operating systems use different numeric constants for different 44 * error numbers, and sometimes error numbers don't exist in more than one 45 * operating system. These routines convert between BSM and local error 46 * number spaces, subject to the above realities. BSM error numbers are 47 * stored in a single 8-bit character, so don't have a byte order. 48 * 49 * Don't include string definitions when this code is compiled into a kernel. 50 */ 51struct bsm_errno { 52 int be_bsm_errno; 53 int be_local_errno; 54#if !defined(KERNEL) && !defined(_KERNEL) 55 const char *be_strerror; 56#endif 57}; 58 59#define ERRNO_NO_LOCAL_MAPPING -600 60 61#if !defined(KERNEL) && !defined(_KERNEL) 62#define ES(x) x 63#else 64#define ES(x) 65#endif 66 67/* 68 * Mapping table -- please maintain in numeric sorted order with respect to 69 * the BSM constant. Today we do a linear lookup, but could switch to a 70 * binary search if it makes sense. We only ifdef errors that aren't 71 * generally available, but it does make the table a lot more ugly. 72 * 73 * XXXRW: It would be nice to have a similar ordered table mapping to BSM 74 * constant from local constant, but the order of local constants varies by 75 * OS. Really we need to build that table at compile-time but don't do that 76 * yet. 77 * 78 * XXXRW: We currently embed English-language error strings here, but should 79 * support catalogues; these are only used if the OS doesn't have an error 80 * string using strerror(3). 81 */ 82static const struct bsm_errno bsm_errnos[] = { 83 { BSM_ERRNO_ESUCCESS, 0, ES("Success") }, 84 { BSM_ERRNO_EPERM, EPERM, ES("Operation not permitted") }, 85 { BSM_ERRNO_ENOENT, ENOENT, ES("No such file or directory") }, 86 { BSM_ERRNO_ESRCH, ESRCH, ES("No such process") }, 87 { BSM_ERRNO_EINTR, EINTR, ES("Interrupted system call") }, 88 { BSM_ERRNO_EIO, EIO, ES("Input/output error") }, 89 { BSM_ERRNO_ENXIO, ENXIO, ES("Device not configured") }, 90 { BSM_ERRNO_E2BIG, E2BIG, ES("Argument list too long") }, 91 { BSM_ERRNO_ENOEXEC, ENOEXEC, ES("Exec format error") }, 92 { BSM_ERRNO_EBADF, EBADF, ES("Bad file descriptor") }, 93 { BSM_ERRNO_ECHILD, ECHILD, ES("No child processes") }, 94 { BSM_ERRNO_EAGAIN, EAGAIN, ES("Resource temporarily unavailable") }, 95 { BSM_ERRNO_ENOMEM, ENOMEM, ES("Cannot allocate memory") }, 96 { BSM_ERRNO_EACCES, EACCES, ES("Permission denied") }, 97 { BSM_ERRNO_EFAULT, EFAULT, ES("Bad address") }, 98 { BSM_ERRNO_ENOTBLK, ENOTBLK, ES("Block device required") }, 99 { BSM_ERRNO_EBUSY, EBUSY, ES("Device busy") }, 100 { BSM_ERRNO_EEXIST, EEXIST, ES("File exists") }, 101 { BSM_ERRNO_EXDEV, EXDEV, ES("Cross-device link") }, 102 { BSM_ERRNO_ENODEV, ENODEV, ES("Operation not supported by device") }, 103 { BSM_ERRNO_ENOTDIR, ENOTDIR, ES("Not a directory") }, 104 { BSM_ERRNO_EISDIR, EISDIR, ES("Is a directory") }, 105 { BSM_ERRNO_EINVAL, EINVAL, ES("Invalid argument") }, 106 { BSM_ERRNO_ENFILE, ENFILE, ES("Too many open files in system") }, 107 { BSM_ERRNO_EMFILE, EMFILE, ES("Too many open files") }, 108 { BSM_ERRNO_ENOTTY, ENOTTY, ES("Inappropriate ioctl for device") }, 109 { BSM_ERRNO_ETXTBSY, ETXTBSY, ES("Text file busy") }, 110 { BSM_ERRNO_EFBIG, EFBIG, ES("File too large") }, 111 { BSM_ERRNO_ENOSPC, ENOSPC, ES("No space left on device") }, 112 { BSM_ERRNO_ESPIPE, ESPIPE, ES("Illegal seek") }, 113 { BSM_ERRNO_EROFS, EROFS, ES("Read-only file system") }, 114 { BSM_ERRNO_EMLINK, EMLINK, ES("Too many links") }, 115 { BSM_ERRNO_EPIPE, EPIPE, ES("Broken pipe") }, 116 { BSM_ERRNO_EDOM, EDOM, ES("Numerical argument out of domain") }, 117 { BSM_ERRNO_ERANGE, ERANGE, ES("Result too large") }, 118 { BSM_ERRNO_ENOMSG, ENOMSG, ES("No message of desired type") }, 119 { BSM_ERRNO_EIDRM, EIDRM, ES("Identifier removed") }, 120 { BSM_ERRNO_ECHRNG, 121#ifdef ECHRNG 122 ECHRNG, 123#else 124 ERRNO_NO_LOCAL_MAPPING, 125#endif 126 ES("Channel number out of range") }, 127 { BSM_ERRNO_EL2NSYNC, 128#ifdef EL2NSYNC 129 EL2NSYNC, 130#else 131 ERRNO_NO_LOCAL_MAPPING, 132#endif 133 ES("Level 2 not synchronized") }, 134 { BSM_ERRNO_EL3HLT, 135#ifdef EL3HLT 136 EL3HLT, 137#else 138 ERRNO_NO_LOCAL_MAPPING, 139#endif 140 ES("Level 3 halted") }, 141 { BSM_ERRNO_EL3RST, 142#ifdef EL3RST 143 EL3RST, 144#else 145 ERRNO_NO_LOCAL_MAPPING, 146#endif 147 ES("Level 3 reset") }, 148 { BSM_ERRNO_ELNRNG, 149#ifdef ELNRNG 150 ELNRNG, 151#else 152 ERRNO_NO_LOCAL_MAPPING, 153#endif 154 ES("Link number out of range") }, 155 { BSM_ERRNO_EUNATCH, 156#ifdef EUNATCH 157 EUNATCH, 158#else 159 ERRNO_NO_LOCAL_MAPPING, 160#endif 161 ES("Protocol driver not attached") }, 162 { BSM_ERRNO_ENOCSI, 163#ifdef ENOCSI 164 ENOCSI, 165#else 166 ERRNO_NO_LOCAL_MAPPING, 167#endif 168 ES("No CSI structure available") }, 169 { BSM_ERRNO_EL2HLT, 170#ifdef EL2HLT 171 EL2HLT, 172#else 173 ERRNO_NO_LOCAL_MAPPING, 174#endif 175 ES("Level 2 halted") }, 176 { BSM_ERRNO_EDEADLK, EDEADLK, ES("Resource deadlock avoided") }, 177 { BSM_ERRNO_ENOLCK, ENOLCK, ES("No locks available") }, 178 { BSM_ERRNO_ECANCELED, ECANCELED, ES("Operation canceled") }, 179 { BSM_ERRNO_ENOTSUP, ENOTSUP, ES("Operation not supported") }, 180 { BSM_ERRNO_EDQUOT, EDQUOT, ES("Disc quota exceeded") }, 181 { BSM_ERRNO_EBADE, 182#ifdef EBADE 183 EBADE, 184#else 185 ERRNO_NO_LOCAL_MAPPING, 186#endif 187 ES("Invalid exchange") }, 188 { BSM_ERRNO_EBADR, 189#ifdef EBADR 190 EBADR, 191#else 192 ERRNO_NO_LOCAL_MAPPING, 193#endif 194 ES("Invalid request descriptor") }, 195 { BSM_ERRNO_EXFULL, 196#ifdef EXFULL 197 EXFULL, 198#else 199 ERRNO_NO_LOCAL_MAPPING, 200#endif 201 ES("Exchange full") }, 202 { BSM_ERRNO_ENOANO, 203#ifdef ENOANO 204 ENOANO, 205#else 206 ERRNO_NO_LOCAL_MAPPING, 207#endif 208 ES("No anode") }, 209 { BSM_ERRNO_EBADRQC, 210#ifdef EBADRQC 211 EBADRQC, 212#else 213 ERRNO_NO_LOCAL_MAPPING, 214#endif 215 ES("Invalid request descriptor") }, 216 { BSM_ERRNO_EBADSLT, 217#ifdef EBADSLT 218 EBADSLT, 219#else 220 ERRNO_NO_LOCAL_MAPPING, 221#endif 222 ES("Invalid slot") }, 223 { BSM_ERRNO_EDEADLOCK, 224#ifdef EDEADLOCK 225 EDEADLOCK, 226#else 227 ERRNO_NO_LOCAL_MAPPING, 228#endif 229 ES("Resource deadlock avoided") }, 230 { BSM_ERRNO_EBFONT, 231#ifdef EBFONT 232 EBFONT, 233#else 234 ERRNO_NO_LOCAL_MAPPING, 235#endif 236 ES("Bad font file format") }, 237 { BSM_ERRNO_EOWNERDEAD, 238#ifdef EOWNERDEAD 239 EOWNERDEAD, 240#else 241 ERRNO_NO_LOCAL_MAPPING, 242#endif 243 ES("Process died with the lock") }, 244 { BSM_ERRNO_ENOTRECOVERABLE, 245#ifdef ENOTRECOVERABLE 246 ENOTRECOVERABLE, 247#else 248 ERRNO_NO_LOCAL_MAPPING, 249#endif 250 ES("Lock is not recoverable") }, 251 { BSM_ERRNO_ENOSTR, 252#ifdef ENOSTR 253 ENOSTR, 254#else 255 ERRNO_NO_LOCAL_MAPPING, 256#endif 257 ES("Device not a stream") }, 258 { BSM_ERRNO_ENONET, 259#ifdef ENONET 260 ENONET, 261#else 262 ERRNO_NO_LOCAL_MAPPING, 263#endif 264 ES("Machine is not on the network") }, 265 { BSM_ERRNO_ENOPKG, 266#ifdef ENOPKG 267 ENOPKG, 268#else 269 ERRNO_NO_LOCAL_MAPPING, 270#endif 271 ES("Package not installed") }, 272 { BSM_ERRNO_EREMOTE, EREMOTE, 273 ES("Too many levels of remote in path") }, 274 { BSM_ERRNO_ENOLINK, 275#ifdef ENOLINK 276 ENOLINK, 277#else 278 ERRNO_NO_LOCAL_MAPPING, 279#endif 280 ES("Link has been severed") }, 281 { BSM_ERRNO_EADV, 282#ifdef EADV 283 EADV, 284#else 285 ERRNO_NO_LOCAL_MAPPING, 286#endif 287 ES("Advertise error") }, 288 { BSM_ERRNO_ESRMNT, 289#ifdef ESRMNT 290 ESRMNT, 291#else 292 ERRNO_NO_LOCAL_MAPPING, 293#endif 294 ES("srmount error") }, 295 { BSM_ERRNO_ECOMM, 296#ifdef ECOMM 297 ECOMM, 298#else 299 ERRNO_NO_LOCAL_MAPPING, 300#endif 301 ES("Communication error on send") }, 302 { BSM_ERRNO_EPROTO, 303#ifdef EPROTO 304 EPROTO, 305#else 306 ERRNO_NO_LOCAL_MAPPING, 307#endif 308 ES("Protocol error") }, 309 { BSM_ERRNO_ELOCKUNMAPPED, 310#ifdef ELOCKUNMAPPED 311 ELOCKUNMAPPED, 312#else 313 ERRNO_NO_LOCAL_MAPPING, 314#endif 315 ES("Locked lock was unmapped") }, 316 { BSM_ERRNO_ENOTACTIVE, 317#ifdef ENOTACTIVE 318 ENOTACTIVE, 319#else 320 ERRNO_NO_LOCAL_MAPPING, 321#endif 322 ES("Facility is not active") }, 323 { BSM_ERRNO_EMULTIHOP, 324#ifdef EMULTIHOP 325 EMULTIHOP, 326#else 327 ERRNO_NO_LOCAL_MAPPING, 328#endif 329 ES("Multihop attempted") }, 330 { BSM_ERRNO_EBADMSG, 331#ifdef EBADMSG 332 EBADMSG, 333#else 334 ERRNO_NO_LOCAL_MAPPING, 335#endif 336 ES("Bad message") }, 337 { BSM_ERRNO_ENAMETOOLONG, ENAMETOOLONG, ES("File name too long") }, 338 { BSM_ERRNO_EOVERFLOW, EOVERFLOW, 339 ES("Value too large to be stored in data type") }, 340 { BSM_ERRNO_ENOTUNIQ, 341#ifdef ENOTUNIQ 342 ENOTUNIQ, 343#else 344 ERRNO_NO_LOCAL_MAPPING, 345#endif 346 ES("Given log name not unique") }, 347 { BSM_ERRNO_EBADFD, 348#ifdef EBADFD 349 EBADFD, 350#else 351 ERRNO_NO_LOCAL_MAPPING, 352#endif 353 ES("Given f.d. invalid for this operation") }, 354 { BSM_ERRNO_EREMCHG, 355#ifdef EREMCHG 356 EREMCHG, 357#else 358 ERRNO_NO_LOCAL_MAPPING, 359#endif 360 ES("Remote address changed") }, 361 { BSM_ERRNO_ELIBACC, 362#ifdef ELIBACC 363 ELIBACC, 364#else 365 ERRNO_NO_LOCAL_MAPPING, 366#endif 367 ES("Can't access a needed shared lib") }, 368 { BSM_ERRNO_ELIBBAD, 369#ifdef ELIBBAD 370 ELIBBAD, 371#else 372 ERRNO_NO_LOCAL_MAPPING, 373#endif 374 ES("Accessing a corrupted shared lib") }, 375 { BSM_ERRNO_ELIBSCN, 376#ifdef ELIBSCN 377 ELIBSCN, 378#else 379 ERRNO_NO_LOCAL_MAPPING, 380#endif 381 ES(".lib section in a.out corrupted") }, 382 { BSM_ERRNO_ELIBMAX, 383#ifdef ELIBMAX 384 ELIBMAX, 385#else 386 ERRNO_NO_LOCAL_MAPPING, 387#endif 388 ES("Attempting to link in too many libs") }, 389 { BSM_ERRNO_ELIBEXEC, 390#ifdef ELIBEXEC 391 ELIBEXEC, 392#else 393 ERRNO_NO_LOCAL_MAPPING, 394#endif 395 ES("Attempting to exec a shared library") }, 396 { BSM_ERRNO_EILSEQ, EILSEQ, ES("Illegal byte sequence") }, 397 { BSM_ERRNO_ENOSYS, ENOSYS, ES("Function not implemented") }, 398 { BSM_ERRNO_ELOOP, ELOOP, ES("Too many levels of symbolic links") }, 399 { BSM_ERRNO_ERESTART, 400#ifdef ERESTART 401 ERESTART, 402#else 403 ERRNO_NO_LOCAL_MAPPING, 404#endif 405 ES("Restart syscall") }, 406 { BSM_ERRNO_ESTRPIPE, 407#ifdef ESTRPIPE 408 ESTRPIPE, 409#else 410 ERRNO_NO_LOCAL_MAPPING, 411#endif 412 ES("If pipe/FIFO, don't sleep in stream head") }, 413 { BSM_ERRNO_ENOTEMPTY, ENOTEMPTY, ES("Directory not empty") }, 414 { BSM_ERRNO_EUSERS, EUSERS, ES("Too many users") }, 415 { BSM_ERRNO_ENOTSOCK, ENOTSOCK, 416 ES("Socket operation on non-socket") }, 417 { BSM_ERRNO_EDESTADDRREQ, EDESTADDRREQ, 418 ES("Destination address required") }, 419 { BSM_ERRNO_EMSGSIZE, EMSGSIZE, ES("Message too long") }, 420 { BSM_ERRNO_EPROTOTYPE, EPROTOTYPE, 421 ES("Protocol wrong type for socket") }, 422 { BSM_ERRNO_ENOPROTOOPT, ENOPROTOOPT, ES("Protocol not available") }, 423 { BSM_ERRNO_EPROTONOSUPPORT, EPROTONOSUPPORT, 424 ES("Protocol not supported") }, 425 { BSM_ERRNO_ESOCKTNOSUPPORT, ESOCKTNOSUPPORT, 426 ES("Socket type not supported") }, 427 { BSM_ERRNO_EOPNOTSUPP, EOPNOTSUPP, ES("Operation not supported") }, 428 { BSM_ERRNO_EPFNOSUPPORT, EPFNOSUPPORT, 429 ES("Protocol family not supported") }, 430 { BSM_ERRNO_EAFNOSUPPORT, EAFNOSUPPORT, 431 ES("Address family not supported by protocol family") }, 432 { BSM_ERRNO_EADDRINUSE, EADDRINUSE, ES("Address already in use") }, 433 { BSM_ERRNO_EADDRNOTAVAIL, EADDRNOTAVAIL, 434 ES("Can't assign requested address") }, 435 { BSM_ERRNO_ENETDOWN, ENETDOWN, ES("Network is down") }, 436 { BSM_ERRNO_ENETRESET, ENETRESET, 437 ES("Network dropped connection on reset") }, 438 { BSM_ERRNO_ECONNABORTED, ECONNABORTED, 439 ES("Software caused connection abort") }, 440 { BSM_ERRNO_ECONNRESET, ECONNRESET, ES("Connection reset by peer") }, 441 { BSM_ERRNO_ENOBUFS, ENOBUFS, ES("No buffer space available") }, 442 { BSM_ERRNO_EISCONN, EISCONN, ES("Socket is already connected") }, 443 { BSM_ERRNO_ENOTCONN, ENOTCONN, ES("Socket is not connected") }, 444 { BSM_ERRNO_ESHUTDOWN, ESHUTDOWN, 445 ES("Can't send after socket shutdown") }, 446 { BSM_ERRNO_ETOOMANYREFS, ETOOMANYREFS, 447 ES("Too many references: can't splice") }, 448 { BSM_ERRNO_ETIMEDOUT, ETIMEDOUT, ES("Operation timed out") }, 449 { BSM_ERRNO_ECONNREFUSED, ECONNREFUSED, ES("Connection refused") }, 450 { BSM_ERRNO_EHOSTDOWN, EHOSTDOWN, ES("Host is down") }, 451 { BSM_ERRNO_EHOSTUNREACH, EHOSTUNREACH, ES("No route to host") }, 452 { BSM_ERRNO_EALREADY, EALREADY, ES("Operation already in progress") }, 453 { BSM_ERRNO_EINPROGRESS, EINPROGRESS, 454 ES("Operation now in progress") }, 455 { BSM_ERRNO_ESTALE, ESTALE, ES("Stale NFS file handle") }, 456 { BSM_ERRNO_EPWROFF, 457#ifdef EPWROFF 458 EPWROFF, 459#else 460 ERRNO_NO_LOCAL_MAPPING, 461#endif 462 ES("Device power is off") }, 463 { BSM_ERRNO_EDEVERR, 464#ifdef EDEVERR 465 EDEVERR, 466#else 467 ERRNO_NO_LOCAL_MAPPING, 468#endif 469 ES("Device error") }, 470 { BSM_ERRNO_EBADEXEC, 471#ifdef EBADEXEC 472 EBADEXEC, 473#else 474 ERRNO_NO_LOCAL_MAPPING, 475#endif 476 ES("Bad executable") }, 477 { BSM_ERRNO_EBADARCH, 478#ifdef EBADARCH 479 EBADARCH, 480#else 481 ERRNO_NO_LOCAL_MAPPING, 482#endif 483 ES("Bad CPU type in executable") }, 484 { BSM_ERRNO_ESHLIBVERS, 485#ifdef ESHLIBVERS 486 ESHLIBVERS, 487#else 488 ERRNO_NO_LOCAL_MAPPING, 489#endif 490 ES("Shared library version mismatch") }, 491 { BSM_ERRNO_EBADMACHO, 492#ifdef EBADMACHO 493 EBADMACHO, 494#else 495 ERRNO_NO_LOCAL_MAPPING, 496#endif
|