108 #define PLATFORM_ERRNO(_platform) <ipxe/errno/_platform.h> 109 #include PLATFORM_ERRNO(PLATFORM) 120 extern char missing_errfile_declaration[]
__attribute__ (( deprecated ));
122 #define ERRFILE ( ( int ) ( 0 * ( ( intptr_t ) missing_errfile_declaration ) ) ) 134 #define __einfo( platform, posix, uniq, desc ) ( platform, posix, uniq, desc ) 142 #define __einfo_platform( einfo ) __einfo_extract_platform einfo 143 #define __einfo_extract_platform( platform, posix, uniq, desc ) platform 151 #define __einfo_posix( einfo ) __einfo_extract_posix einfo 152 #define __einfo_extract_posix( platform, posix, uniq, desc ) posix 160 #define __einfo_uniq( einfo ) __einfo_extract_uniq einfo 161 #define __einfo_extract_uniq( platform, posix, uniq, desc ) uniq 169 #define __einfo_desc( einfo ) __einfo_extract_desc einfo 170 #define __einfo_extract_desc( platform, posix, uniq, desc ) desc 180 #define __einfo_uniqify( einfo_base, uniq, desc ) \ 181 __einfo ( __einfo_platform ( einfo_base ), \ 182 __einfo_posix ( einfo_base ), \ 193 #define __einfo_platformify( einfo_base, platform, desc ) \ 194 __einfo ( platform, __einfo_posix ( einfo_base ), \ 195 __einfo_uniq ( einfo_base ), desc ) 203 #define __einfo_errno( einfo ) \ 205 ( ( __einfo_posix ( einfo ) << 24 ) | ( ERRFILE ) | \ 206 ( __einfo_uniq ( einfo ) << 8 ) | \ 207 ( PLATFORM_TO_ERRNO ( __einfo_platform ( einfo ) ) << 0 ) ) ) 225 #define EUNIQ( einfo_base, uniq, ... ) ( { \ 226 euniq_discard ( 0, ##__VA_ARGS__ ); \ 227 ( ( int ) ( __einfo_error ( einfo_base ) | \ 228 ( (uniq) << 8 ) ) ); } ) 248 #define EPLATFORM( einfo_base, platform, ... ) ( { \ 249 eplatform_discard ( 0, ##__VA_ARGS__ ); \ 250 ( ( int ) ( __einfo_error ( einfo_base ) | \ 251 PLATFORM_TO_ERRNO ( platform ) ) ); } ) 260 #define __einfo_error( einfo ) ( { \ 261 __asm__ ( ".section \".einfo\", \"\", " PROGBITS_OPS "\n\t" \ 264 ".long ( 4f - 1b )\n\t" \ 265 ".long %" ASM_NO_PREFIX "0\n\t" \ 266 ".long ( 2f - 1b )\n\t" \ 267 ".long ( 3f - 1b )\n\t" \ 268 ".long %" ASM_NO_PREFIX "1\n\t" \ 269 "\n2:\t.asciz \"" __einfo_desc ( einfo ) "\"\n\t" \ 270 "\n3:\t.asciz \"" __FILE__ "\"\n\t" \ 273 ".previous\n\t" : : \ 274 "i" ( __einfo_errno ( einfo ) ), \ 275 "i" ( __LINE__ ) ); \ 276 __einfo_errno ( einfo ); } ) 288 #define ENOERR __einfo_error ( EINFO_ENOERR ) 289 #define EINFO_ENOERR __einfo ( PLATFORM_ENOERR, 0x00, 0, \ 290 "Operation completed successfully" ) 293 #define E2BIG __einfo_error ( EINFO_E2BIG ) 294 #define EINFO_E2BIG __einfo ( PLATFORM_E2BIG, 0x01, 0, \ 295 "Argument list too long" ) 298 #define EACCES __einfo_error ( EINFO_EACCES ) 299 #define EINFO_EACCES __einfo ( PLATFORM_EACCES, 0x02, 0, \ 300 "Permission denied" ) 303 #define EADDRINUSE __einfo_error ( EINFO_EADDRINUSE ) 304 #define EINFO_EADDRINUSE __einfo ( PLATFORM_EADDRINUSE, 0x03, 0, \ 305 "Address already in use" ) 308 #define EADDRNOTAVAIL __einfo_error ( EINFO_EADDRNOTAVAIL ) 309 #define EINFO_EADDRNOTAVAIL __einfo ( PLATFORM_EADDRNOTAVAIL, 0x04, 0, \ 310 "Address not available" ) 313 #define EAFNOSUPPORT __einfo_error ( EINFO_EAFNOSUPPORT ) 314 #define EINFO_EAFNOSUPPORT __einfo ( PLATFORM_EAFNOSUPPORT, 0x05, 0, \ 315 "Address family not supported" ) 318 #define EAGAIN __einfo_error ( EINFO_EAGAIN ) 319 #define EINFO_EAGAIN __einfo ( PLATFORM_EAGAIN, 0x06, 0, \ 320 "Resource temporarily unavailable" ) 323 #define EALREADY __einfo_error ( EINFO_EALREADY ) 324 #define EINFO_EALREADY __einfo ( PLATFORM_EALREADY, 0x07, 0, \ 325 "Connection already in progress" ) 328 #define EBADF __einfo_error ( EINFO_EBADF ) 329 #define EINFO_EBADF __einfo ( PLATFORM_EBADF, 0x08, 0, \ 330 "Bad file descriptor" ) 333 #define EBADMSG __einfo_error ( EINFO_EBADMSG ) 334 #define EINFO_EBADMSG __einfo ( PLATFORM_EBADMSG, 0x09, 0, \ 338 #define EBUSY __einfo_error ( EINFO_EBUSY ) 339 #define EINFO_EBUSY __einfo ( PLATFORM_EBUSY, 0x0a, 0, \ 340 "Device or resource busy" ) 343 #define ECANCELED __einfo_error ( EINFO_ECANCELED ) 344 #define EINFO_ECANCELED __einfo ( PLATFORM_ECANCELED, 0x0b, 0, \ 345 "Operation canceled" ) 348 #define ECHILD __einfo_error ( EINFO_ECHILD ) 349 #define EINFO_ECHILD __einfo ( PLATFORM_ECHILD, 0x0c, 0, \ 350 "No child processes" ) 353 #define ECONNABORTED __einfo_error ( EINFO_ECONNABORTED ) 354 #define EINFO_ECONNABORTED __einfo ( PLATFORM_ECONNABORTED, 0x0d, 0, \ 355 "Connection aborted" ) 358 #define ECONNREFUSED __einfo_error ( EINFO_ECONNREFUSED ) 359 #define EINFO_ECONNREFUSED __einfo ( PLATFORM_ECONNREFUSED, 0x0e, 0, \ 360 "Connection refused" ) 363 #define ECONNRESET __einfo_error ( EINFO_ECONNRESET ) 364 #define EINFO_ECONNRESET __einfo ( PLATFORM_ECONNRESET, 0x0f, 0, \ 368 #define EDEADLK __einfo_error ( EINFO_EDEADLK ) 369 #define EINFO_EDEADLK __einfo ( PLATFORM_EDEADLK, 0x10, 0, \ 370 "Resource deadlock avoided" ) 373 #define EDESTADDRREQ __einfo_error ( EINFO_EDESTADDRREQ ) 374 #define EINFO_EDESTADDRREQ __einfo ( PLATFORM_EDESTADDRREQ, 0x11, 0, \ 375 "Destination address required" ) 378 #define EDOM __einfo_error ( EINFO_EDOM ) 379 #define EINFO_EDOM __einfo ( PLATFORM_EDOM, 0x12, 0, \ 380 "Mathematics argument out of domain of function" ) 383 #define EDQUOT __einfo_error ( EINFO_EDQUOT ) 384 #define EINFO_EDQUOT __einfo ( PLATFORM_EDQUOT, 0x13, 0, \ 385 "Disk quote exceeded" ) 388 #define EEXIST __einfo_error ( EINFO_EEXIST ) 389 #define EINFO_EEXIST __einfo ( PLATFORM_EEXIST, 0x14, 0, \ 393 #define EFAULT __einfo_error ( EINFO_EFAULT ) 394 #define EINFO_EFAULT __einfo ( PLATFORM_EFAULT, 0x15, 0, \ 398 #define EFBIG __einfo_error ( EINFO_EFBIG ) 399 #define EINFO_EFBIG __einfo ( PLATFORM_EFBIG, 0x16, 0, \ 403 #define EHOSTUNREACH __einfo_error ( EINFO_EHOSTUNREACH ) 404 #define EINFO_EHOSTUNREACH __einfo ( PLATFORM_EHOSTUNREACH, 0x17, 0, \ 405 "Host is unreachable" ) 408 #define EIDRM __einfo_error ( EINFO_EIDRM ) 409 #define EINFO_EIDRM __einfo ( PLATFORM_EIDRM, 0x18, 0, \ 410 "Identifier removed" ) 413 #define EILSEQ __einfo_error ( EINFO_EILSEQ ) 414 #define EINFO_EILSEQ __einfo ( PLATFORM_EILSEQ, 0x19, 0, \ 415 "Illegal byte sequence" ) 418 #define EINPROGRESS __einfo_error ( EINFO_EINPROGRESS ) 419 #define EINFO_EINPROGRESS __einfo ( PLATFORM_EINPROGRESS, 0x1a, 0, \ 420 "Operation in progress" ) 423 #define EINTR __einfo_error ( EINFO_EINTR ) 424 #define EINFO_EINTR __einfo ( PLATFORM_EINTR, 0x1b, 0, \ 425 "Interrupted function call" ) 428 #define EINVAL __einfo_error ( EINFO_EINVAL ) 429 #define EINFO_EINVAL __einfo ( PLATFORM_EINVAL, 0x1c, 0, \ 433 #define EIO __einfo_error ( EINFO_EIO ) 434 #define EINFO_EIO __einfo ( PLATFORM_EIO, 0x1d, 0, \ 435 "Input/output error" ) 438 #define EISCONN __einfo_error ( EINFO_EISCONN ) 439 #define EINFO_EISCONN __einfo ( PLATFORM_EISCONN, 0x1e, 0, \ 440 "Socket is connected" ) 443 #define EISDIR __einfo_error ( EINFO_EISDIR ) 444 #define EINFO_EISDIR __einfo ( PLATFORM_EISDIR, 0x1f, 0, \ 448 #define ELOOP __einfo_error ( EINFO_ELOOP ) 449 #define EINFO_ELOOP __einfo ( PLATFORM_ELOOP, 0x20, 0, \ 450 "Too many levels of symbolic links" ) 453 #define EMFILE __einfo_error ( EINFO_EMFILE ) 454 #define EINFO_EMFILE __einfo ( PLATFORM_EMFILE, 0x21, 0, \ 455 "Too many open files" ) 458 #define EMLINK __einfo_error ( EINFO_EMLINK ) 459 #define EINFO_EMLINK __einfo ( PLATFORM_EMLINK, 0x22, 0, \ 463 #define EMSGSIZE __einfo_error ( EINFO_EMSGSIZE ) 464 #define EINFO_EMSGSIZE __einfo ( PLATFORM_EMSGSIZE, 0x23, 0, \ 468 #define EMULTIHOP __einfo_error ( EINFO_EMULTIHOP ) 469 #define EINFO_EMULTIHOP __einfo ( PLATFORM_EMULTIHOP, 0x24, 0, \ 470 "Multihop attempted" ) 473 #define ENAMETOOLONG __einfo_error ( EINFO_ENAMETOOLONG ) 474 #define EINFO_ENAMETOOLONG __einfo ( PLATFORM_ENAMETOOLONG, 0x25, 0, \ 475 "Filename too long" ) 478 #define ENETDOWN __einfo_error ( EINFO_ENETDOWN ) 479 #define EINFO_ENETDOWN __einfo ( PLATFORM_ENETDOWN, 0x26, 0, \ 483 #define ENETRESET __einfo_error ( EINFO_ENETRESET ) 484 #define EINFO_ENETRESET __einfo ( PLATFORM_ENETRESET, 0x27, 0, \ 485 "Connection aborted by network" ) 488 #define ENETUNREACH __einfo_error ( EINFO_ENETUNREACH ) 489 #define EINFO_ENETUNREACH __einfo ( PLATFORM_ENETUNREACH, 0x28, 0, \ 490 "Network unreachable" ) 493 #define ENFILE __einfo_error ( EINFO_ENFILE ) 494 #define EINFO_ENFILE __einfo ( PLATFORM_ENFILE, 0x29, 0, \ 495 "Too many open files in system" ) 498 #define ENOBUFS __einfo_error ( EINFO_ENOBUFS ) 499 #define EINFO_ENOBUFS __einfo ( PLATFORM_ENOBUFS, 0x2a, 0, \ 500 "No buffer space available" ) 503 #define ENODATA __einfo_error ( EINFO_ENODATA ) 504 #define EINFO_ENODATA __einfo ( PLATFORM_ENODATA, 0x2b, 0, \ 505 "No message is available on the STREAM " \ 509 #define ENODEV __einfo_error ( EINFO_ENODEV ) 510 #define EINFO_ENODEV __einfo ( PLATFORM_ENODEV, 0x2c, 0, \ 514 #define ENOENT __einfo_error ( EINFO_ENOENT ) 515 #define EINFO_ENOENT __einfo ( PLATFORM_ENOENT, 0x2d, 0, \ 516 "No such file or directory" ) 519 #define ENOEXEC __einfo_error ( EINFO_ENOEXEC ) 520 #define EINFO_ENOEXEC __einfo ( PLATFORM_ENOEXEC, 0x2e, 0, \ 521 "Exec format error" ) 524 #define ENOLCK __einfo_error ( EINFO_ENOLCK ) 525 #define EINFO_ENOLCK __einfo ( PLATFORM_ENOLCK, 0x2f, 0, \ 526 "No locks available" ) 529 #define ENOLINK __einfo_error ( EINFO_ENOLINK ) 530 #define EINFO_ENOLINK __einfo ( PLATFORM_ENOLINK, 0x30, 0, \ 531 "Link has been severed" ) 534 #define ENOMEM __einfo_error ( EINFO_ENOMEM ) 535 #define EINFO_ENOMEM __einfo ( PLATFORM_ENOMEM, 0x31, 0, \ 539 #define ENOMSG __einfo_error ( EINFO_ENOMSG ) 540 #define EINFO_ENOMSG __einfo ( PLATFORM_ENOMSG, 0x32, 0, \ 541 "No message of the desired type" ) 544 #define ENOPROTOOPT __einfo_error ( EINFO_ENOPROTOOPT ) 545 #define EINFO_ENOPROTOOPT __einfo ( PLATFORM_ENOPROTOOPT, 0x33, 0, \ 546 "Protocol not available" ) 549 #define ENOSPC __einfo_error ( EINFO_ENOSPC ) 550 #define EINFO_ENOSPC __einfo ( PLATFORM_ENOSPC, 0x34, 0, \ 551 "No space left on device" ) 554 #define ENOSR __einfo_error ( EINFO_ENOSR ) 555 #define EINFO_ENOSR __einfo ( PLATFORM_ENOSR, 0x35, 0, \ 556 "No STREAM resources" ) 559 #define ENOSTR __einfo_error ( EINFO_ENOSTR ) 560 #define EINFO_ENOSTR __einfo ( PLATFORM_ENOSTR, 0x36, 0, \ 564 #define ENOSYS __einfo_error ( EINFO_ENOSYS ) 565 #define EINFO_ENOSYS __einfo ( PLATFORM_ENOSYS, 0x37, 0, \ 566 "Function not implemented" ) 569 #define ENOTCONN __einfo_error ( EINFO_ENOTCONN ) 570 #define EINFO_ENOTCONN __einfo ( PLATFORM_ENOTCONN, 0x38, 0, \ 571 "The socket is not connected" ) 574 #define ENOTDIR __einfo_error ( EINFO_ENOTDIR ) 575 #define EINFO_ENOTDIR __einfo ( PLATFORM_ENOTDIR, 0x39, 0, \ 579 #define ENOTEMPTY __einfo_error ( EINFO_ENOTEMPTY ) 580 #define EINFO_ENOTEMPTY __einfo ( PLATFORM_ENOTEMPTY, 0x3a, 0, \ 581 "Directory not empty" ) 584 #define ENOTSOCK __einfo_error ( EINFO_ENOTSOCK ) 585 #define EINFO_ENOTSOCK __einfo ( PLATFORM_ENOTSOCK, 0x3b, 0, \ 589 #define ENOTSUP __einfo_error ( EINFO_ENOTSUP ) 590 #define EINFO_ENOTSUP __einfo ( PLATFORM_ENOTSUP, 0x3c, 0, \ 591 "Operation not supported" ) 594 #define ENOTTY __einfo_error ( EINFO_ENOTTY ) 595 #define EINFO_ENOTTY __einfo ( PLATFORM_ENOTTY, 0x3d, 0, \ 596 "Inappropriate I/O control operation" ) 599 #define ENXIO __einfo_error ( EINFO_ENXIO ) 600 #define EINFO_ENXIO __einfo ( PLATFORM_ENXIO, 0x3e, 0, \ 601 "No such device or address" ) 604 #define EOPNOTSUPP __einfo_error ( EINFO_EOPNOTSUPP ) 605 #define EINFO_EOPNOTSUPP __einfo ( PLATFORM_EOPNOTSUPP, 0x3f, 0, \ 606 "Operation not supported on socket" ) 609 #define EOVERFLOW __einfo_error ( EINFO_EOVERFLOW ) 610 #define EINFO_EOVERFLOW __einfo ( PLATFORM_EOVERFLOW, 0x40, 0, \ 611 "Value too large to be stored in data type" ) 614 #define EPERM __einfo_error ( EINFO_EPERM ) 615 #define EINFO_EPERM __einfo ( PLATFORM_EPERM, 0x41, 0, \ 616 "Operation not permitted" ) 619 #define EPIPE __einfo_error ( EINFO_EPIPE ) 620 #define EINFO_EPIPE __einfo ( PLATFORM_EPIPE, 0x42, 0, \ 624 #define EPROTO __einfo_error ( EINFO_EPROTO ) 625 #define EINFO_EPROTO __einfo ( PLATFORM_EPROTO, 0x43, 0, \ 629 #define EPROTONOSUPPORT __einfo_error ( EINFO_EPROTONOSUPPORT ) 630 #define EINFO_EPROTONOSUPPORT __einfo ( PLATFORM_EPROTONOSUPPORT, 0x44, 0, \ 631 "Protocol not supported" ) 634 #define EPROTOTYPE __einfo_error ( EINFO_EPROTOTYPE ) 635 #define EINFO_EPROTOTYPE __einfo ( PLATFORM_EPROTOTYPE, 0x45, 0, \ 636 "Protocol wrong type for socket" ) 639 #define ERANGE __einfo_error ( EINFO_ERANGE ) 640 #define EINFO_ERANGE __einfo ( PLATFORM_ERANGE, 0x46, 0, \ 644 #define EROFS __einfo_error ( EINFO_EROFS ) 645 #define EINFO_EROFS __einfo ( PLATFORM_EROFS, 0x47, 0, \ 646 "Read-only file system" ) 649 #define ESPIPE __einfo_error ( EINFO_ESPIPE ) 650 #define EINFO_ESPIPE __einfo ( PLATFORM_ESPIPE, 0x48, 0, \ 654 #define ESRCH __einfo_error ( EINFO_ESRCH ) 655 #define EINFO_ESRCH __einfo ( PLATFORM_ESRCH, 0x49, 0, \ 659 #define ESTALE __einfo_error ( EINFO_ESTALE ) 660 #define EINFO_ESTALE __einfo ( PLATFORM_ESTALE, 0x4a, 0, \ 661 "Stale file handle" ) 664 #define ETIME __einfo_error ( EINFO_ETIME ) 665 #define EINFO_ETIME __einfo ( PLATFORM_ETIME, 0x4b, 0, \ 669 #define ETIMEDOUT __einfo_error ( EINFO_ETIMEDOUT ) 670 #define EINFO_ETIMEDOUT __einfo ( PLATFORM_ETIMEDOUT, 0x4c, 0, \ 671 "Connection timed out" ) 674 #define ETXTBSY __einfo_error ( EINFO_ETXTBSY ) 675 #define EINFO_ETXTBSY __einfo ( PLATFORM_ETXTBSY, 0x4d, 0, \ 679 #define EWOULDBLOCK __einfo_error ( EINFO_EWOULDBLOCK ) 680 #define EINFO_EWOULDBLOCK __einfo ( PLATFORM_EWOULDBLOCK, 0x4e, 0, \ 681 "Operation would block" ) 684 #define EXDEV __einfo_error ( EINFO_EXDEV ) 685 #define EINFO_EXDEV __einfo ( PLATFORM_EXDEV, 0x4f, 0, \ 691 #define EINFO_EPLATFORM __einfo ( 0, 0x7f, 0, "Platform-generated error" ) int errno
Global "last error" number.
#define __unused
Declare a variable or data structure as unused.
char missing_errfile_declaration [] __attribute__((deprecated))
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
static void eplatform_discard(int dummy __unused,...)
static void euniq_discard(int dummy __unused,...)