Annotation of qemu/roms/ipxe/src/include/errno.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (C) 2010 Michael Brown <[email protected]>.
                      3:  *
                      4:  * This program is free software; you can redistribute it and/or
                      5:  * modify it under the terms of the GNU General Public License as
                      6:  * published by the Free Software Foundation; either version 2 of the
                      7:  * License, or any later version.
                      8:  *
                      9:  * This program is distributed in the hope that it will be useful, but
                     10:  * WITHOUT ANY WARRANTY; without even the implied warranty of
                     11:  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
                     12:  * General Public License for more details.
                     13:  *
                     14:  * You should have received a copy of the GNU General Public License
                     15:  * along with this program; if not, write to the Free Software
                     16:  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
                     17:  */
                     18: 
                     19: #ifndef ERRNO_H
                     20: #define ERRNO_H
                     21: 
                     22: FILE_LICENCE ( GPL2_OR_LATER );
                     23: 
                     24: /** @file
                     25:  *
                     26:  * Error codes
                     27:  *
                     28:  * Return status codes as used within iPXE are designed to allow for
                     29:  * maximum visibility into the source of an error even in an end-user
                     30:  * build with no debugging.  They are constructed as follows:
                     31:  *
                     32:  * Bits 7-0 : PXE error code
                     33:  *
                     34:  * This is the closest equivalent PXE error code
                     35:  * (e.g. PXENV_STATUS_OUT_OF_RESOURCES), and is the only part of the
                     36:  * error that will be returned via the PXE API, since PXE has
                     37:  * predefined error codes.
                     38:  *
                     39:  * Bits 12-8 : Per-file disambiguator
                     40:  *
                     41:  * When the same error number can be generated from multiple points
                     42:  * within a file, this field can be used to identify the unique
                     43:  * instance.
                     44:  *
                     45:  * Bits 23-13 : File identifier
                     46:  *
                     47:  * This is a unique identifier for the file generating the error
                     48:  * (e.g. ERRFILE_tcp for tcp.c).
                     49:  *
                     50:  * Bits 30-24 : POSIX error code
                     51:  *
                     52:  * This is the closest equivalent POSIX error code (e.g. ENOMEM).
                     53:  *
                     54:  * Bit 31 : Reserved
                     55:  *
                     56:  * Errors are usually return as negative error numbers (e.g. -EINVAL);
                     57:  * bit 31 is therefore unusable.
                     58:  *
                     59:  *
                     60:  * The convention within the code is that errors are negative and
                     61:  * expressed using the POSIX error, e.g.
                     62:  *
                     63:  *     return -EINVAL;
                     64:  *
                     65:  * By various bits of preprocessor magic, the PXE error code and file
                     66:  * identifier are already incorporated into the definition of the
                     67:  * POSIX error macro, which keeps the code relatively clean.
                     68:  *
                     69:  *
                     70:  * Functions that wish to return failures should be declared as
                     71:  * returning an integer @c rc "Return status code".  A return value of
                     72:  * zero indicates success, a non-zero value indicates failure.  The
                     73:  * return value can be passed directly to strerror() in order to
                     74:  * generate a human-readable error message, e.g.
                     75:  *
                     76:  *     if ( ( rc = some_function ( ... ) ) != 0 ) {
                     77:  *         DBG ( "Whatever I was trying to do failed: %s\n", strerror ( rc ) );
                     78:  *         return rc;
                     79:  *     }
                     80:  *
                     81:  * As illustrated in the above example, error returns should generally
                     82:  * be directly propagated upward to the calling function.
                     83:  *
                     84:  *
                     85:  * Individual files may declare localised errors using
                     86:  * __einfo_uniqify().  For example, iscsi.c declares a localised
                     87:  * version of EACCES for the error of "access denied due to incorrect
                     88:  * target username":
                     89:  *
                     90:  *     #define EACCES_INCORRECT_TARGET_USERNAME        \
                     91:  *         __einfo_error ( EINFO_EACCES_INCORRECT_TARGET_USERNAME )
                     92:  *     #define EINFO_EACCES_INCORRECT_TARGET_USERNAME \
                     93:  *         __einfo_uniqify ( EINFO_EACCESS, 0x01, "Incorrect target username" )
                     94:  *
                     95:  * which can then be used as:
                     96:  *
                     97:  *     return -EACCES_INCORRECT_TARGET_USERNAME;
                     98:  *
                     99:  */
                    100: 
                    101: /* Get definitions for file identifiers */
                    102: #include <ipxe/errfile.h>
                    103: 
                    104: /* If we do not have a valid file identifier, generate a compiler
                    105:  * warning upon usage of any error codes.  (Don't just use a #warning,
                    106:  * because some files include errno.h but don't ever actually use any
                    107:  * error codes.)
                    108:  */
                    109: #if ! ERRFILE
                    110: extern char missing_errfile_declaration[] __attribute__ (( deprecated ));
                    111: #undef ERRFILE
                    112: #define ERRFILE ( 0 * ( ( int ) missing_errfile_declaration ) )
                    113: #endif
                    114: 
                    115: /**
                    116:  * Declare error information
                    117:  *
                    118:  * @v pxe              PXE error number (0x00-0xff)
                    119:  * @v posix            POSIX error number (0x00-0x7f)
                    120:  * @v uniq             Error disambiguator (0x00-0x1f)
                    121:  * @v desc             Error description
                    122:  * @ret einfo          Error information
                    123:  */
                    124: #define __einfo( pxe, posix, uniq, desc ) ( pxe, posix, uniq, desc )
                    125: 
                    126: /**
                    127:  * Get PXE error number
                    128:  *
                    129:  * @v einfo            Error information
                    130:  * @ret pxe            PXE error number
                    131:  */
                    132: #define __einfo_pxe( einfo ) __einfo_extract_pxe einfo
                    133: #define __einfo_extract_pxe( pxe, posix, uniq, desc ) pxe
                    134: 
                    135: /**
                    136:  * Get POSIX error number
                    137:  *
                    138:  * @v einfo            Error information
                    139:  * @ret posix          POSIX error number
                    140:  */
                    141: #define __einfo_posix( einfo ) __einfo_extract_posix einfo
                    142: #define __einfo_extract_posix( pxe, posix, uniq, desc ) posix
                    143: 
                    144: /**
                    145:  * Get error disambiguator
                    146:  *
                    147:  * @v einfo            Error information
                    148:  * @ret uniq           Error disambiguator
                    149:  */
                    150: #define __einfo_uniq( einfo ) __einfo_extract_uniq einfo
                    151: #define __einfo_extract_uniq( pxe, posix, uniq, desc ) uniq
                    152: 
                    153: /**
                    154:  * Get error description
                    155:  *
                    156:  * @v einfo            Error information
                    157:  * @ret desc           Error description
                    158:  */
                    159: #define __einfo_desc( einfo ) __einfo_extract_desc einfo
                    160: #define __einfo_extract_desc( pxe, posix, uniq, desc ) desc
                    161: 
                    162: /**
                    163:  * Declare disambiguated error
                    164:  *
                    165:  * @v einfo_base       Base error information
                    166:  * @v uniq             Error disambiguator
                    167:  * @v desc             Error description
                    168:  * @ret einfo          Error information
                    169:  */
                    170: #define __einfo_uniqify( einfo_base, uniq, desc )                      \
                    171:        __einfo ( __einfo_pxe ( einfo_base ),                           \
                    172:                  __einfo_posix ( einfo_base ),                         \
                    173:                  uniq, desc )
                    174: 
                    175: /**
                    176:  * Get error number
                    177:  *
                    178:  * @v einfo            Error information
                    179:  * @ret errno          Error number
                    180:  */
                    181: #define __einfo_errno( einfo )                                         \
                    182:        ( ( __einfo_posix ( einfo ) << 24 ) | ( ERRFILE ) |             \
                    183:          ( __einfo_uniq ( einfo ) << 8 ) |                             \
                    184:          ( __einfo_pxe ( einfo ) << 0 ) )
                    185: 
                    186: /**
                    187:  * Disambiguate a base error based on non-constant information
                    188:  *
                    189:  * @v error_base       Base error
                    190:  * @v uniq             Error disambiguator
                    191:  * @v ...              List of expected possible disambiguated errors
                    192:  * @ret error          Error
                    193:  *
                    194:  * EUNIQ() should be used when information from an external source is
                    195:  * being incorporated into an error.  For example, the 802.11 stack
                    196:  * uses EUNIQ() to incorporate 802.11 status codes returned by an
                    197:  * access point into an error.
                    198:  *
                    199:  * EUNIQ() should not be used for constant error disambiguators; use
                    200:  * __einfo_uniqify() instead.
                    201:  */
                    202: #define EUNIQ( errno, uniq, ... ) ( {                                  \
                    203:        euniq_discard ( 0, ##__VA_ARGS__);                              \
                    204:        ( ( int ) ( (errno) | ( (uniq) << 8 ) ) ); } )
                    205: static inline void euniq_discard ( int dummy __unused, ... ) {}
                    206: 
                    207: /**
                    208:  * Declare error
                    209:  *
                    210:  * @v einfo            Error information
                    211:  * @ret error          Error
                    212:  */
                    213: #define __einfo_error( einfo ) ( {                                     \
                    214:        __asm__ ( ".section \".einfo\", \"\", @progbits\n\t"            \
                    215:                  ".align 8\n\t"                                        \
                    216:                  "\n1:\n\t"                                            \
                    217:                  ".long ( 4f - 1b )\n\t"                               \
                    218:                  ".long %c0\n\t"                                       \
                    219:                  ".long ( 2f - 1b )\n\t"                               \
                    220:                  ".long ( 3f - 1b )\n\t"                               \
                    221:                  ".long %c1\n\t"                                       \
                    222:                  "\n2:\t.asciz \"" __einfo_desc ( einfo ) "\"\n\t"     \
                    223:                  "\n3:\t.asciz \"" __FILE__ "\"\n\t"                   \
                    224:                  ".align 8\n\t"                                        \
                    225:                  "\n4:\n\t"                                            \
                    226:                  ".previous\n\t" : :                                   \
                    227:                  "i" ( __einfo_errno ( einfo) ),                       \
                    228:                  "i" ( __LINE__ ) );                                   \
                    229:        __einfo_errno ( einfo ); } )
                    230: 
                    231: /**
                    232:  * @defgroup pxeerrors PXE error codes
                    233:  *
                    234:  * The names, meanings and values of these error codes are defined by
                    235:  * the PXE specification.
                    236:  *
                    237:  * @{
                    238:  */
                    239: 
                    240: /* Generic errors */
                    241: #define        PXENV_STATUS_SUCCESS                                           0x0000
                    242: #define        PXENV_STATUS_FAILURE                                           0x0001
                    243: #define        PXENV_STATUS_BAD_FUNC                                          0x0002
                    244: #define        PXENV_STATUS_UNSUPPORTED                                       0x0003
                    245: #define        PXENV_STATUS_KEEP_UNDI                                         0x0004
                    246: #define        PXENV_STATUS_KEEP_ALL                                          0x0005
                    247: #define        PXENV_STATUS_OUT_OF_RESOURCES                                  0x0006
                    248: 
                    249: /* ARP errors (0x0010 to 0x001f) */
                    250: #define        PXENV_STATUS_ARP_TIMEOUT                                       0x0011
                    251: 
                    252: /* Base-Code state errors */
                    253: #define        PXENV_STATUS_UDP_CLOSED                                        0x0018
                    254: #define        PXENV_STATUS_UDP_OPEN                                          0x0019
                    255: #define        PXENV_STATUS_TFTP_CLOSED                                       0x001a
                    256: #define        PXENV_STATUS_TFTP_OPEN                                         0x001b
                    257: 
                    258: /* BIOS/system errors (0x0020 to 0x002f) */
                    259: #define        PXENV_STATUS_MCOPY_PROBLEM                                     0x0020
                    260: #define        PXENV_STATUS_BIS_INTEGRITY_FAILURE                             0x0021
                    261: #define        PXENV_STATUS_BIS_VALIDATE_FAILURE                              0x0022
                    262: #define        PXENV_STATUS_BIS_INIT_FAILURE                                  0x0023
                    263: #define        PXENV_STATUS_BIS_SHUTDOWN_FAILURE                              0x0024
                    264: #define        PXENV_STATUS_BIS_GBOA_FAILURE                                  0x0025
                    265: #define        PXENV_STATUS_BIS_FREE_FAILURE                                  0x0026
                    266: #define        PXENV_STATUS_BIS_GSI_FAILURE                                   0x0027
                    267: #define        PXENV_STATUS_BIS_BAD_CKSUM                                     0x0028
                    268: 
                    269: /* TFTP/MTFTP errors (0x0030 to 0x003f) */
                    270: #define        PXENV_STATUS_TFTP_CANNOT_ARP_ADDRESS                           0x0030
                    271: #define        PXENV_STATUS_TFTP_OPEN_TIMEOUT                                 0x0032
                    272: #define        PXENV_STATUS_TFTP_UNKNOWN_OPCODE                               0x0033
                    273: #define        PXENV_STATUS_TFTP_READ_TIMEOUT                                 0x0035
                    274: #define        PXENV_STATUS_TFTP_ERROR_OPCODE                                 0x0036
                    275: #define        PXENV_STATUS_TFTP_CANNOT_OPEN_CONNECTION                       0x0038
                    276: #define        PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION                  0x0039
                    277: #define        PXENV_STATUS_TFTP_TOO_MANY_PACKAGES                            0x003a
                    278: #define        PXENV_STATUS_TFTP_FILE_NOT_FOUND                               0x003b
                    279: #define        PXENV_STATUS_TFTP_ACCESS_VIOLATION                             0x003c
                    280: #define        PXENV_STATUS_TFTP_NO_MCAST_ADDRESS                             0x003d
                    281: #define        PXENV_STATUS_TFTP_NO_FILESIZE                                  0x003e
                    282: #define        PXENV_STATUS_TFTP_INVALID_PACKET_SIZE                          0x003f
                    283: 
                    284: /* Reserved errors 0x0040 to 0x004f) */
                    285: 
                    286: /* DHCP/BOOTP errors (0x0050 to 0x005f) */
                    287: #define        PXENV_STATUS_DHCP_TIMEOUT                                      0x0051
                    288: #define        PXENV_STATUS_DHCP_NO_IP_ADDRESS                                0x0052
                    289: #define        PXENV_STATUS_DHCP_NO_BOOTFILE_NAME                             0x0053
                    290: #define        PXENV_STATUS_DHCP_BAD_IP_ADDRESS                               0x0054
                    291: 
                    292: /* Driver errors (0x0060 to 0x006f) */
                    293: #define        PXENV_STATUS_UNDI_INVALID_FUNCTION                             0x0060
                    294: #define        PXENV_STATUS_UNDI_MEDIATEST_FAILED                             0x0061
                    295: #define        PXENV_STATUS_UNDI_CANNOT_INIT_NIC_FOR_MCAST                    0x0062
                    296: #define        PXENV_STATUS_UNDI_CANNOT_INITIALIZE_NIC                        0x0063
                    297: #define        PXENV_STATUS_UNDI_CANNOT_INITIALIZE_PHY                        0x0064
                    298: #define        PXENV_STATUS_UNDI_CANNOT_READ_CONFIG_DATA                      0x0065
                    299: #define        PXENV_STATUS_UNDI_CANNOT_READ_INIT_DATA                        0x0066
                    300: #define        PXENV_STATUS_UNDI_BAD_MAC_ADDRESS                              0x0067
                    301: #define        PXENV_STATUS_UNDI_BAD_EEPROM_CHECKSUM                          0x0068
                    302: #define        PXENV_STATUS_UNDI_ERROR_SETTING_ISR                            0x0069
                    303: #define        PXENV_STATUS_UNDI_INVALID_STATE                                0x006a
                    304: #define        PXENV_STATUS_UNDI_TRANSMIT_ERROR                               0x006b
                    305: #define        PXENV_STATUS_UNDI_INVALID_PARAMETER                            0x006c
                    306: 
                    307: /* ROM and NBP bootstrap errors (0x0070 to 0x007f) */
                    308: #define        PXENV_STATUS_BSTRAP_PROMPT_MENU                                0x0074
                    309: #define        PXENV_STATUS_BSTRAP_MCAST_ADDR                                 0x0076
                    310: #define        PXENV_STATUS_BSTRAP_MISSING_LIST                               0x0077
                    311: #define        PXENV_STATUS_BSTRAP_NO_RESPONSE                                0x0078
                    312: #define        PXENV_STATUS_BSTRAP_FILE_TOO_BIG                               0x0079
                    313: 
                    314: /* Environment NBP errors (0x0080 to 0x008f) */
                    315: 
                    316: /* Reserved errors (0x0090 to 0x009f) */
                    317: 
                    318: /* Miscellaneous errors (0x00a0 to 0x00af) */
                    319: #define        PXENV_STATUS_BINL_CANCELED_BY_KEYSTROKE                        0x00a0
                    320: #define        PXENV_STATUS_BINL_NO_PXE_SERVER                                0x00a1
                    321: #define        PXENV_STATUS_NOT_AVAILABLE_IN_PMODE                            0x00a2
                    322: #define        PXENV_STATUS_NOT_AVAILABLE_IN_RMODE                            0x00a3
                    323: 
                    324: /* BUSD errors (0x00b0 to 0x00bf) */
                    325: #define        PXENV_STATUS_BUSD_DEVICE_NOT_SUPPORTED                         0x00b0
                    326: 
                    327: /* Loader errors (0x00c0 to 0x00cf) */
                    328: #define        PXENV_STATUS_LOADER_NO_FREE_BASE_MEMORY                        0x00c0
                    329: #define        PXENV_STATUS_LOADER_NO_BC_ROMID                                0x00c1
                    330: #define        PXENV_STATUS_LOADER_BAD_BC_ROMID                               0x00c2
                    331: #define        PXENV_STATUS_LOADER_BAD_BC_RUNTIME_IMAGE                       0x00c3
                    332: #define        PXENV_STATUS_LOADER_NO_UNDI_ROMID                              0x00c4
                    333: #define        PXENV_STATUS_LOADER_BAD_UNDI_ROMID                             0x00c5
                    334: #define        PXENV_STATUS_LOADER_BAD_UNDI_DRIVER_IMAGE                      0x00c6
                    335: #define        PXENV_STATUS_LOADER_NO_PXE_STRUCT                              0x00c8
                    336: #define        PXENV_STATUS_LOADER_NO_PXENV_STRUCT                            0x00c9
                    337: #define        PXENV_STATUS_LOADER_UNDI_START                                 0x00ca
                    338: #define        PXENV_STATUS_LOADER_BC_START                                   0x00cb
                    339: 
                    340: /** @} */
                    341: 
                    342: /** Derive PXENV_STATUS code from iPXE error number */
                    343: #define PXENV_STATUS( rc ) ( (-(rc)) & 0x00ff )
                    344: 
                    345: /**
                    346:  * @defgroup posixerrors POSIX error codes
                    347:  *
                    348:  * The names and meanings (but not the values) of these error codes
                    349:  * are defined by POSIX.
                    350:  *
                    351:  * @{
                    352:  */
                    353: 
                    354: /** Operation completed successfully */
                    355: #define ENOERR __einfo_error ( EINFO_ENOERR )
                    356: #define EINFO_ENOERR __einfo ( PXENV_STATUS_SUCCESS, 0x00, 0, \
                    357:                               "Operation completed successfully" )
                    358: 
                    359: /** Argument list too long */
                    360: #define E2BIG __einfo_error ( EINFO_E2BIG )
                    361: #define EINFO_E2BIG __einfo ( PXENV_STATUS_BAD_FUNC, 0x01, 0, \
                    362:                              "Argument list too long" )
                    363: 
                    364: /** Permission denied */
                    365: #define EACCES __einfo_error ( EINFO_EACCES )
                    366: #define EINFO_EACCES __einfo ( PXENV_STATUS_TFTP_ACCESS_VIOLATION, 0x02, 0, \
                    367:                               "Permission denied" )
                    368: 
                    369: /** Address already in use */
                    370: #define EADDRINUSE __einfo_error ( EINFO_EADDRINUSE )
                    371: #define EINFO_EADDRINUSE __einfo ( PXENV_STATUS_UDP_OPEN, 0x03, 0, \
                    372:                                   "Address already in use" )
                    373: 
                    374: /** Address not available */
                    375: #define EADDRNOTAVAIL __einfo_error ( EINFO_EADDRNOTAVAIL )
                    376: #define EINFO_EADDRNOTAVAIL __einfo ( PXENV_STATUS_UDP_OPEN, 0x04, 0, \
                    377:                                      "Address not available" )
                    378: 
                    379: /** Address family not supported */
                    380: #define EAFNOSUPPORT __einfo_error ( EINFO_EAFNOSUPPORT )
                    381: #define EINFO_EAFNOSUPPORT __einfo ( PXENV_STATUS_UNSUPPORTED, 0x05, 0, \
                    382:                                     "Address family not supported" )
                    383: 
                    384: /** Resource temporarily unavailable */
                    385: #define EAGAIN __einfo_error ( EINFO_EAGAIN )
                    386: #define EINFO_EAGAIN __einfo ( PXENV_STATUS_FAILURE, 0x06, 0, \
                    387:                               "Resource temporarily unavailable" )
                    388: 
                    389: /** Connection already in progress */
                    390: #define EALREADY __einfo_error ( EINFO_EALREADY )
                    391: #define EINFO_EALREADY __einfo ( PXENV_STATUS_UDP_OPEN, 0x07, 0, \
                    392:                                 "Connection already in progress" )
                    393: 
                    394: /** Bad file descriptor */
                    395: #define EBADF __einfo_error ( EINFO_EBADF )
                    396: #define EINFO_EBADF __einfo ( PXENV_STATUS_TFTP_CLOSED, 0x08, 0, \
                    397:                              "Bad file descriptor" )
                    398: 
                    399: /** Bad message */
                    400: #define EBADMSG __einfo_error ( EINFO_EBADMSG )
                    401: #define EINFO_EBADMSG __einfo ( PXENV_STATUS_FAILURE, 0x09, 0, \
                    402:                                "Bad message" )
                    403: 
                    404: /** Device or resource busy */
                    405: #define EBUSY __einfo_error ( EINFO_EBUSY )
                    406: #define EINFO_EBUSY __einfo ( PXENV_STATUS_OUT_OF_RESOURCES, 0x0a, 0, \
                    407:                              "Device or resource busy" )
                    408: 
                    409: /** Operation canceled */
                    410: #define ECANCELED __einfo_error ( EINFO_ECANCELED )
                    411: #define EINFO_ECANCELED __einfo ( PXENV_STATUS_BINL_CANCELED_BY_KEYSTROKE, \
                    412:                                  0x0b, 0, "Operation canceled" )
                    413: 
                    414: /** No child processes */
                    415: #define ECHILD __einfo_error ( EINFO_ECHILD )
                    416: #define EINFO_ECHILD __einfo ( PXENV_STATUS_TFTP_FILE_NOT_FOUND, 0x0c, 0, \
                    417:                               "No child processes" )
                    418: 
                    419: /** Connection aborted */
                    420: #define ECONNABORTED __einfo_error ( EINFO_ECONNABORTED )
                    421: #define EINFO_ECONNABORTED                                               \
                    422:        __einfo ( PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION, 0x0d, 0, \
                    423:                  "Connection aborted" )
                    424: 
                    425: /** Connection refused */
                    426: #define ECONNREFUSED __einfo_error ( EINFO_ECONNREFUSED )
                    427: #define EINFO_ECONNREFUSED __einfo ( PXENV_STATUS_TFTP_CANNOT_OPEN_CONNECTION, \
                    428:                                     0x0e, 0, "Connection refused" )
                    429: 
                    430: /** Connection reset */
                    431: #define ECONNRESET __einfo_error ( EINFO_ECONNRESET )
                    432: #define EINFO_ECONNRESET                                                 \
                    433:        __einfo ( PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION, 0x0f, 0, \
                    434:                  "Connection reset" )
                    435: 
                    436: /** Resource deadlock avoided */
                    437: #define EDEADLK __einfo_error ( EINFO_EDEADLK )
                    438: #define EINFO_EDEADLK __einfo ( PXENV_STATUS_FAILURE, 0x10, 0, \
                    439:                                "Resource deadlock avoided" )
                    440: 
                    441: /** Destination address required */
                    442: #define EDESTADDRREQ __einfo_error ( EINFO_EDESTADDRREQ )
                    443: #define EINFO_EDESTADDRREQ __einfo ( PXENV_STATUS_BAD_FUNC, 0x11, 0, \
                    444:                                     "Destination address required" )
                    445: 
                    446: /** Mathematics argument out of domain of function */
                    447: #define EDOM __einfo_error ( EINFO_EDOM )
                    448: #define EINFO_EDOM __einfo ( PXENV_STATUS_FAILURE, 0x12, 0, \
                    449:                             "Mathematics argument out of domain of function" )
                    450: 
                    451: /** Disk quota exceeded */
                    452: #define EDQUOT __einfo_error ( EINFO_EDQUOT )
                    453: #define EINFO_EDQUOT __einfo ( PXENV_STATUS_FAILURE, 0x13, 0, \
                    454:                               "Disk quote exceeded" )
                    455: 
                    456: /** File exists */
                    457: #define EEXIST __einfo_error ( EINFO_EEXIST )
                    458: #define EINFO_EEXIST __einfo ( PXENV_STATUS_FAILURE, 0x14, 0, \
                    459:                               "File exists" )
                    460: 
                    461: /** Bad address */
                    462: #define EFAULT __einfo_error ( EINFO_EFAULT )
                    463: #define EINFO_EFAULT __einfo ( PXENV_STATUS_MCOPY_PROBLEM, 0x15, 0, \
                    464:                               "Bad address" )
                    465: 
                    466: /** File too large */
                    467: #define EFBIG __einfo_error ( EINFO_EFBIG )
                    468: #define EINFO_EFBIG __einfo ( PXENV_STATUS_MCOPY_PROBLEM, 0x16, 0, \
                    469:                              "File too large" )
                    470: 
                    471: /** Host is unreachable */
                    472: #define EHOSTUNREACH __einfo_error ( EINFO_EHOSTUNREACH )
                    473: #define EINFO_EHOSTUNREACH __einfo ( PXENV_STATUS_ARP_TIMEOUT, 0x17, 0, \
                    474:                                     "Host is unreachable" )
                    475: 
                    476: /** Identifier removed */
                    477: #define EIDRM __einfo_error ( EINFO_EIDRM )
                    478: #define EINFO_EIDRM __einfo ( PXENV_STATUS_FAILURE, 0x18, 0, \
                    479:                              "Identifier removed" )
                    480: 
                    481: /** Illegal byte sequence */
                    482: #define EILSEQ __einfo_error ( EINFO_EILSEQ )
                    483: #define EINFO_EILSEQ __einfo ( PXENV_STATUS_FAILURE, 0x19, 0, \
                    484:                               "Illegal byte sequence" )
                    485: 
                    486: /** Operation in progress */
                    487: #define EINPROGRESS __einfo_error ( EINFO_EINPROGRESS )
                    488: #define EINFO_EINPROGRESS __einfo ( PXENV_STATUS_FAILURE, 0x1a, 0, \
                    489:                                    "Operation in progress" )
                    490: 
                    491: /** Interrupted function call */
                    492: #define EINTR __einfo_error ( EINFO_EINTR )
                    493: #define EINFO_EINTR __einfo ( PXENV_STATUS_FAILURE, 0x1b, 0, \
                    494:                              "Interrupted function call" )
                    495: 
                    496: /** Invalid argument */
                    497: #define EINVAL __einfo_error ( EINFO_EINVAL )
                    498: #define EINFO_EINVAL __einfo ( PXENV_STATUS_BAD_FUNC, 0x1c, 0, \
                    499:                               "Invalid argument" )
                    500: 
                    501: /** Input/output error */
                    502: #define EIO __einfo_error ( EINFO_EIO )
                    503: #define EINFO_EIO __einfo ( PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION, \
                    504:                            0x1d, 0, "Input/output error" )
                    505: 
                    506: /** Socket is connected */
                    507: #define EISCONN __einfo_error ( EINFO_EISCONN )
                    508: #define EINFO_EISCONN __einfo ( PXENV_STATUS_UDP_OPEN, 0x1e, 0, \
                    509:                                "Socket is connected" )
                    510: 
                    511: /** Is a directory */
                    512: #define EISDIR __einfo_error ( EINFO_EISDIR )
                    513: #define EINFO_EISDIR __einfo ( PXENV_STATUS_FAILURE, 0x1f, 0, \
                    514:                               "Is a directory" )
                    515: 
                    516: /** Too many levels of symbolic links */
                    517: #define ELOOP __einfo_error ( EINFO_ELOOP )
                    518: #define EINFO_ELOOP __einfo ( PXENV_STATUS_FAILURE, 0x20, 0, \
                    519:                              "Too many levels of symbolic links" )
                    520: 
                    521: /** Too many open files */
                    522: #define EMFILE __einfo_error ( EINFO_EMFILE )
                    523: #define EINFO_EMFILE __einfo ( PXENV_STATUS_OUT_OF_RESOURCES, 0x21, 0, \
                    524:                               "Too many open files" )
                    525: 
                    526: /** Too many links */
                    527: #define EMLINK __einfo_error ( EINFO_EMLINK )
                    528: #define EINFO_EMLINK __einfo ( PXENV_STATUS_FAILURE, 0x22, 0, \
                    529:                               "Too many links" )
                    530: 
                    531: /** Message too long */
                    532: #define EMSGSIZE __einfo_error ( EINFO_EMSGSIZE )
                    533: #define EINFO_EMSGSIZE __einfo ( PXENV_STATUS_BAD_FUNC, 0x23, 0, \
                    534:                                 "Message too long" )
                    535: 
                    536: /** Multihop attempted */
                    537: #define EMULTIHOP __einfo_error ( EINFO_EMULTIHOP )
                    538: #define EINFO_EMULTIHOP __einfo ( PXENV_STATUS_FAILURE, 0x24, 0, \
                    539:                                  "Multihop attempted" )
                    540: 
                    541: /** Filename too long */
                    542: #define ENAMETOOLONG __einfo_error ( EINFO_ENAMETOOLONG )
                    543: #define EINFO_ENAMETOOLONG __einfo ( PXENV_STATUS_FAILURE, 0x25, 0, \
                    544:                                     "Filename too long" )
                    545: 
                    546: /** Network is down */
                    547: #define ENETDOWN __einfo_error ( EINFO_ENETDOWN )
                    548: #define EINFO_ENETDOWN __einfo ( PXENV_STATUS_ARP_TIMEOUT, 0x26, 0, \
                    549:                                 "Network is down" )
                    550: 
                    551: /** Connection aborted by network */
                    552: #define ENETRESET __einfo_error ( EINFO_ENETRESET )
                    553: #define EINFO_ENETRESET __einfo ( PXENV_STATUS_FAILURE, 0x27, 0, \
                    554:                                  "Connection aborted by network" )
                    555: 
                    556: /** Network unreachable */
                    557: #define ENETUNREACH __einfo_error ( EINFO_ENETUNREACH )
                    558: #define EINFO_ENETUNREACH __einfo ( PXENV_STATUS_ARP_TIMEOUT, 0x28, 0, \
                    559:                                    "Network unreachable" )
                    560: 
                    561: /** Too many open files in system */
                    562: #define ENFILE __einfo_error ( EINFO_ENFILE )
                    563: #define EINFO_ENFILE __einfo ( PXENV_STATUS_OUT_OF_RESOURCES, 0x29, 0, \
                    564:                               "Too many open files in system" )
                    565: 
                    566: /** No buffer space available */
                    567: #define ENOBUFS __einfo_error ( EINFO_ENOBUFS )
                    568: #define EINFO_ENOBUFS __einfo ( PXENV_STATUS_OUT_OF_RESOURCES, 0x2a, 0, \
                    569:                                "No buffer space available" )
                    570: 
                    571: /** No message is available on the STREAM head read queue */
                    572: #define ENODATA __einfo_error ( EINFO_ENODATA )
                    573: #define EINFO_ENODATA                           \
                    574:        __einfo ( PXENV_STATUS_FAILURE, 0x2b, 0, \
                    575:                  "No message is available on the STREAM head read queue" )
                    576: 
                    577: /** No such device */
                    578: #define ENODEV __einfo_error ( EINFO_ENODEV )
                    579: #define EINFO_ENODEV __einfo ( PXENV_STATUS_TFTP_FILE_NOT_FOUND, 0x2c, 0, \
                    580:                               "No such device" )
                    581: 
                    582: /** No such file or directory */
                    583: #define ENOENT __einfo_error ( EINFO_ENOENT )
                    584: #define EINFO_ENOENT __einfo ( PXENV_STATUS_TFTP_FILE_NOT_FOUND, 0x2d, 0, \
                    585:                               "No such file or directory" )
                    586: 
                    587: /** Exec format error */
                    588: #define ENOEXEC __einfo_error ( EINFO_ENOEXEC )
                    589: #define EINFO_ENOEXEC __einfo ( PXENV_STATUS_FAILURE, 0x2e, 0, \
                    590:                                "Exec format error" )
                    591: 
                    592: /** No locks available */
                    593: #define ENOLCK __einfo_error ( EINFO_ENOLCK )
                    594: #define EINFO_ENOLCK __einfo ( PXENV_STATUS_FAILURE, 0x2f, 0, \
                    595:                               "No locks available" )
                    596: 
                    597: /** Link has been severed */
                    598: #define ENOLINK __einfo_error ( EINFO_ENOLINK )
                    599: #define EINFO_ENOLINK __einfo ( PXENV_STATUS_FAILURE, 0x30, 0, \
                    600:                                "Link has been severed" )
                    601: 
                    602: /** Not enough space */
                    603: #define ENOMEM __einfo_error ( EINFO_ENOMEM )
                    604: #define EINFO_ENOMEM __einfo ( PXENV_STATUS_OUT_OF_RESOURCES, 0x31, 0, \
                    605:                               "Not enough space" )
                    606: 
                    607: /** No message of the desired type */
                    608: #define ENOMSG __einfo_error ( EINFO_ENOMSG )
                    609: #define EINFO_ENOMSG __einfo ( PXENV_STATUS_FAILURE, 0x32, 0, \
                    610:                               "No message of the desired type" )
                    611: 
                    612: /** Protocol not available */
                    613: #define ENOPROTOOPT __einfo_error ( EINFO_ENOPROTOOPT )
                    614: #define EINFO_ENOPROTOOPT __einfo ( PXENV_STATUS_UNSUPPORTED, 0x33, 0, \
                    615:                                    "Protocol not available" )
                    616: 
                    617: /** No space left on device */
                    618: #define ENOSPC __einfo_error ( EINFO_ENOSPC )
                    619: #define EINFO_ENOSPC __einfo ( PXENV_STATUS_OUT_OF_RESOURCES, 0x34, 0, \
                    620:                               "No space left on device" )
                    621: 
                    622: /** No STREAM resources */
                    623: #define ENOSR __einfo_error ( EINFO_ENOSR )
                    624: #define EINFO_ENOSR __einfo ( PXENV_STATUS_OUT_OF_RESOURCES, 0x35, 0, \
                    625:                              "No STREAM resources" )
                    626: 
                    627: /** Not a STREAM */
                    628: #define ENOSTR __einfo_error ( EINFO_ENOSTR )
                    629: #define EINFO_ENOSTR __einfo ( PXENV_STATUS_FAILURE, 0x36, 0, \
                    630:                               "Not a STREAM" )
                    631: 
                    632: /** Function not implemented */
                    633: #define ENOSYS __einfo_error ( EINFO_ENOSYS )
                    634: #define EINFO_ENOSYS __einfo ( PXENV_STATUS_UNSUPPORTED, 0x37, 0, \
                    635:                               "Function not implemented" )
                    636: 
                    637: /** The socket is not connected */
                    638: #define ENOTCONN __einfo_error ( EINFO_ENOTCONN )
                    639: #define EINFO_ENOTCONN __einfo ( PXENV_STATUS_FAILURE, 0x38, 0, \
                    640:                                 "The socket is not connected" )
                    641: 
                    642: /** Not a directory */
                    643: #define ENOTDIR __einfo_error ( EINFO_ENOTDIR )
                    644: #define EINFO_ENOTDIR __einfo ( PXENV_STATUS_FAILURE, 0x39, 0, \
                    645:                                "Not a directory" )
                    646: 
                    647: /** Directory not empty */
                    648: #define ENOTEMPTY __einfo_error ( EINFO_ENOTEMPTY )
                    649: #define EINFO_ENOTEMPTY __einfo ( PXENV_STATUS_FAILURE, 0x3a, 0, \
                    650:                                  "Directory not empty" )
                    651: 
                    652: /** Not a socket */
                    653: #define ENOTSOCK __einfo_error ( EINFO_ENOTSOCK )
                    654: #define EINFO_ENOTSOCK __einfo ( PXENV_STATUS_FAILURE, 0x3b, 0, \
                    655:                                 "Not a socket" )
                    656: 
                    657: /** Operation not supported */
                    658: #define ENOTSUP __einfo_error ( EINFO_ENOTSUP )
                    659: #define EINFO_ENOTSUP __einfo ( PXENV_STATUS_UNSUPPORTED, 0x3c, 0, \
                    660:                                "Operation not supported" )
                    661: 
                    662: /** Inappropriate I/O control operation */
                    663: #define ENOTTY __einfo_error ( EINFO_ENOTTY )
                    664: #define EINFO_ENOTTY __einfo ( PXENV_STATUS_FAILURE, 0x3d, 0, \
                    665:                               "Inappropriate I/O control operation" )
                    666: 
                    667: /** No such device or address */
                    668: #define ENXIO __einfo_error ( EINFO_ENXIO )
                    669: #define EINFO_ENXIO __einfo ( PXENV_STATUS_TFTP_FILE_NOT_FOUND, 0x3e, 0, \
                    670:                              "No such device or address" )
                    671: 
                    672: /** Operation not supported on socket */
                    673: #define EOPNOTSUPP __einfo_error ( EINFO_EOPNOTSUPP )
                    674: #define EINFO_EOPNOTSUPP __einfo ( PXENV_STATUS_UNSUPPORTED, 0x3f, 0, \
                    675:                                   "Operation not supported on socket" )
                    676: 
                    677: /** Value too large to be stored in data type */
                    678: #define EOVERFLOW __einfo_error ( EINFO_EOVERFLOW )
                    679: #define EINFO_EOVERFLOW __einfo ( PXENV_STATUS_FAILURE, 0x40, 0, \
                    680:                                  "Value too large to be stored in data type" )
                    681: 
                    682: /** Operation not permitted */
                    683: #define EPERM __einfo_error ( EINFO_EPERM )
                    684: #define EINFO_EPERM __einfo ( PXENV_STATUS_TFTP_ACCESS_VIOLATION, 0x41, 0, \
                    685:                              "Operation not permitted" )
                    686: 
                    687: /** Broken pipe */
                    688: #define EPIPE __einfo_error ( EINFO_EPIPE )
                    689: #define EINFO_EPIPE __einfo ( PXENV_STATUS_FAILURE, 0x42, 0, \
                    690:                              "Broken pipe" )
                    691: 
                    692: /** Protocol error */
                    693: #define EPROTO __einfo_error ( EINFO_EPROTO )
                    694: #define EINFO_EPROTO __einfo ( PXENV_STATUS_FAILURE, 0x43, 0, \
                    695:                               "Protocol error" )
                    696: 
                    697: /** Protocol not supported */
                    698: #define EPROTONOSUPPORT __einfo_error ( EINFO_EPROTONOSUPPORT )
                    699: #define EINFO_EPROTONOSUPPORT __einfo ( PXENV_STATUS_UNSUPPORTED, 0x44, 0, \
                    700:                                        "Protocol not supported" )
                    701: 
                    702: /** Protocol wrong type for socket */
                    703: #define EPROTOTYPE __einfo_error ( EINFO_EPROTOTYPE )
                    704: #define EINFO_EPROTOTYPE __einfo ( PXENV_STATUS_FAILURE, 0x45, 0, \
                    705:                                   "Protocol wrong type for socket" )
                    706: 
                    707: /** Result too large */
                    708: #define ERANGE __einfo_error ( EINFO_ERANGE )
                    709: #define EINFO_ERANGE __einfo ( PXENV_STATUS_FAILURE, 0x46, 0, \
                    710:                               "Result too large" )
                    711: 
                    712: /** Read-only file system */
                    713: #define EROFS __einfo_error ( EINFO_EROFS )
                    714: #define EINFO_EROFS __einfo ( PXENV_STATUS_FAILURE, 0x47, 0, \
                    715:                              "Read-only file system" )
                    716: 
                    717: /** Invalid seek */
                    718: #define ESPIPE __einfo_error ( EINFO_ESPIPE )
                    719: #define EINFO_ESPIPE __einfo ( PXENV_STATUS_FAILURE, 0x48, 0, \
                    720:                               "Invalid seek" )
                    721: 
                    722: /** No such process */
                    723: #define ESRCH __einfo_error ( EINFO_ESRCH )
                    724: #define EINFO_ESRCH __einfo ( PXENV_STATUS_TFTP_FILE_NOT_FOUND, 0x49, 0, \
                    725:                              "No such process" )
                    726: 
                    727: /** Stale file handle */
                    728: #define ESTALE __einfo_error ( EINFO_ESTALE )
                    729: #define EINFO_ESTALE __einfo ( PXENV_STATUS_FAILURE, 0x4a, 0, \
                    730:                               "Stale file handle" )
                    731: 
                    732: /** Timer expired */
                    733: #define ETIME __einfo_error ( EINFO_ETIME )
                    734: #define EINFO_ETIME __einfo ( PXENV_STATUS_FAILURE, 0x4b, 0, \
                    735:                              "Timer expired" )
                    736: 
                    737: /** Connection timed out */
                    738: #define ETIMEDOUT __einfo_error ( EINFO_ETIMEDOUT )
                    739: #define EINFO_ETIMEDOUT __einfo ( PXENV_STATUS_TFTP_READ_TIMEOUT, 0x4c, 0, \
                    740:                                  "Connection timed out" )
                    741: 
                    742: /** Text file busy */
                    743: #define ETXTBSY __einfo_error ( EINFO_ETXTBSY )
                    744: #define EINFO_ETXTBSY __einfo ( PXENV_STATUS_FAILURE, 0x4d, 0, \
                    745:                                "Text file busy" )
                    746: 
                    747: /** Operation would block */
                    748: #define EWOULDBLOCK __einfo_error ( EINFO_EWOULDBLOCK )
                    749: #define EINFO_EWOULDBLOCK __einfo ( PXENV_STATUS_TFTP_OPEN, 0x4e, 0, \
                    750:                                    "Operation would block" )
                    751: 
                    752: /** Improper link */
                    753: #define EXDEV __einfo_error ( EINFO_EXDEV )
                    754: #define EINFO_EXDEV __einfo ( PXENV_STATUS_FAILURE, 0x4f, 0, \
                    755:                              "Improper link" )
                    756: 
                    757: /** @} */
                    758: 
                    759: extern int errno;
                    760: 
                    761: #endif /* ERRNO_H */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.