errno.h

Go to the documentation of this file.
00001 #ifndef ERRNO_H
00002 #define ERRNO_H
00003 
00004 FILE_LICENCE ( GPL2_OR_LATER );
00005 
00006 /** @file
00007  *
00008  * Error codes
00009  *
00010  * Return status codes as used within gPXE are designed to allow for
00011  * maximum visibility into the source of an error even in an end-user
00012  * build with no debugging.  They are constructed as follows:
00013  *
00014  * Bits 7-0 : PXE error code
00015  *
00016  * This is the closest equivalent PXE error code
00017  * (e.g. PXENV_STATUS_OUT_OF_RESOURCES), and is the only part of the
00018  * error that will be returned via the PXE API, since PXE has
00019  * predefined error codes.
00020  *
00021  * Bits 12-8 : Per-file disambiguator
00022  *
00023  * When the same error number can be generated from multiple points
00024  * within a file, this field can be used to identify the unique
00025  * instance.
00026  *
00027  * Bits 23-13 : File identifier
00028  *
00029  * This is a unique identifier for the file generating the error
00030  * (e.g. ERRFILE_tcp for tcp.c).
00031  *
00032  * Bits 30-24 : POSIX error code
00033  *
00034  * This is the closest equivalent POSIX error code (e.g. ENOMEM).
00035  *
00036  * Bit 31 : Reserved
00037  *
00038  * Errors are usually return as negative error numbers (e.g. -EINVAL);
00039  * bit 31 is therefore unusable.
00040  *
00041  *
00042  * The convention within the code is that errors are negative and
00043  * expressed using the POSIX error code and (optionally) a per-file
00044  * disambiguator, e.g.
00045  *
00046  *     return -EINVAL;
00047  *
00048  * or
00049  *
00050  *     #define ETCP_BAD_CHECKSUM EUNIQ_02
00051  *     return -( EINVAL | ETCP_BAD_CHECKSUM )
00052  *
00053  * By various bits of preprocessor magic, the PXE error code and file
00054  * identifier are already incorporated into the definition of the
00055  * POSIX error code, which keeps the code relatively clean.
00056  *
00057  *
00058  * Functions that wish to return failures should be declared as
00059  * returning an integer @c rc "Return status code".  A return value of
00060  * zero indicates success, a non-zero value indicates failure.  The
00061  * return value can be passed directly to strerror() in order to
00062  * generate a human-readable error message, e.g.
00063  *
00064  *     if ( ( rc = some_function ( ... ) ) != 0 ) {
00065  *         DBG ( "Whatever I was trying to do failed: %s\n", strerror ( rc ) );
00066  *         return rc;
00067  *     }
00068  *
00069  * As illustrated in the above example, error returns should generally
00070  * be directly propagated upward to the calling function.
00071  *
00072  */
00073 
00074 /* Get definitions for file identifiers */
00075 #include <gpxe/errfile.h>
00076 
00077 /* If we do not have a valid file identifier, generate a compiler
00078  * warning upon usage of any error codes.  (Don't just use a #warning,
00079  * because some files include errno.h but don't ever actually use any
00080  * error codes.)
00081  */
00082 #if ! ERRFILE
00083 extern char missing_errfile_declaration[] __attribute__ (( deprecated ));
00084 #undef ERRFILE
00085 #define ERRFILE ( 0 * ( ( int ) missing_errfile_declaration ) )
00086 #endif
00087 
00088 /** Derive PXENV_STATUS code from gPXE error number */
00089 #define PXENV_STATUS( rc ) ( (-(rc)) & 0x00ff )
00090 
00091 /**
00092  * @defgroup pxeerrors PXE error codes
00093  *
00094  * The names, meanings and values of these error codes are defined by
00095  * the PXE specification.
00096  *
00097  * @{
00098  */
00099 
00100 /* Generic errors */
00101 #define PXENV_STATUS_SUCCESS                                           0x0000
00102 #define PXENV_STATUS_FAILURE                                           0x0001
00103 #define PXENV_STATUS_BAD_FUNC                                          0x0002
00104 #define PXENV_STATUS_UNSUPPORTED                                       0x0003
00105 #define PXENV_STATUS_KEEP_UNDI                                         0x0004
00106 #define PXENV_STATUS_KEEP_ALL                                          0x0005
00107 #define PXENV_STATUS_OUT_OF_RESOURCES                                  0x0006
00108 
00109 /* ARP errors (0x0010 to 0x001f) */
00110 #define PXENV_STATUS_ARP_TIMEOUT                                       0x0011
00111 
00112 /* Base-Code state errors */
00113 #define PXENV_STATUS_UDP_CLOSED                                        0x0018
00114 #define PXENV_STATUS_UDP_OPEN                                          0x0019
00115 #define PXENV_STATUS_TFTP_CLOSED                                       0x001a
00116 #define PXENV_STATUS_TFTP_OPEN                                         0x001b
00117 
00118 /* BIOS/system errors (0x0020 to 0x002f) */
00119 #define PXENV_STATUS_MCOPY_PROBLEM                                     0x0020
00120 #define PXENV_STATUS_BIS_INTEGRITY_FAILURE                             0x0021
00121 #define PXENV_STATUS_BIS_VALIDATE_FAILURE                              0x0022
00122 #define PXENV_STATUS_BIS_INIT_FAILURE                                  0x0023
00123 #define PXENV_STATUS_BIS_SHUTDOWN_FAILURE                              0x0024
00124 #define PXENV_STATUS_BIS_GBOA_FAILURE                                  0x0025
00125 #define PXENV_STATUS_BIS_FREE_FAILURE                                  0x0026
00126 #define PXENV_STATUS_BIS_GSI_FAILURE                                   0x0027
00127 #define PXENV_STATUS_BIS_BAD_CKSUM                                     0x0028
00128 
00129 /* TFTP/MTFTP errors (0x0030 to 0x003f) */
00130 #define PXENV_STATUS_TFTP_CANNOT_ARP_ADDRESS                           0x0030
00131 #define PXENV_STATUS_TFTP_OPEN_TIMEOUT                                 0x0032
00132 #define PXENV_STATUS_TFTP_UNKNOWN_OPCODE                               0x0033
00133 #define PXENV_STATUS_TFTP_READ_TIMEOUT                                 0x0035
00134 #define PXENV_STATUS_TFTP_ERROR_OPCODE                                 0x0036
00135 #define PXENV_STATUS_TFTP_CANNOT_OPEN_CONNECTION                       0x0038
00136 #define PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION                  0x0039
00137 #define PXENV_STATUS_TFTP_TOO_MANY_PACKAGES                            0x003a
00138 #define PXENV_STATUS_TFTP_FILE_NOT_FOUND                               0x003b
00139 #define PXENV_STATUS_TFTP_ACCESS_VIOLATION                             0x003c
00140 #define PXENV_STATUS_TFTP_NO_MCAST_ADDRESS                             0x003d
00141 #define PXENV_STATUS_TFTP_NO_FILESIZE                                  0x003e
00142 #define PXENV_STATUS_TFTP_INVALID_PACKET_SIZE                          0x003f
00143 
00144 /* Reserved errors 0x0040 to 0x004f) */
00145 
00146 /* DHCP/BOOTP errors (0x0050 to 0x005f) */
00147 #define PXENV_STATUS_DHCP_TIMEOUT                                      0x0051
00148 #define PXENV_STATUS_DHCP_NO_IP_ADDRESS                                0x0052
00149 #define PXENV_STATUS_DHCP_NO_BOOTFILE_NAME                             0x0053
00150 #define PXENV_STATUS_DHCP_BAD_IP_ADDRESS                               0x0054
00151 
00152 /* Driver errors (0x0060 to 0x006f) */
00153 #define PXENV_STATUS_UNDI_INVALID_FUNCTION                             0x0060
00154 #define PXENV_STATUS_UNDI_MEDIATEST_FAILED                             0x0061
00155 #define PXENV_STATUS_UNDI_CANNOT_INIT_NIC_FOR_MCAST                    0x0062
00156 #define PXENV_STATUS_UNDI_CANNOT_INITIALIZE_NIC                        0x0063
00157 #define PXENV_STATUS_UNDI_CANNOT_INITIALIZE_PHY                        0x0064
00158 #define PXENV_STATUS_UNDI_CANNOT_READ_CONFIG_DATA                      0x0065
00159 #define PXENV_STATUS_UNDI_CANNOT_READ_INIT_DATA                        0x0066
00160 #define PXENV_STATUS_UNDI_BAD_MAC_ADDRESS                              0x0067
00161 #define PXENV_STATUS_UNDI_BAD_EEPROM_CHECKSUM                          0x0068
00162 #define PXENV_STATUS_UNDI_ERROR_SETTING_ISR                            0x0069
00163 #define PXENV_STATUS_UNDI_INVALID_STATE                                0x006a
00164 #define PXENV_STATUS_UNDI_TRANSMIT_ERROR                               0x006b
00165 #define PXENV_STATUS_UNDI_INVALID_PARAMETER                            0x006c
00166 
00167 /* ROM and NBP bootstrap errors (0x0070 to 0x007f) */
00168 #define PXENV_STATUS_BSTRAP_PROMPT_MENU                                0x0074
00169 #define PXENV_STATUS_BSTRAP_MCAST_ADDR                                 0x0076
00170 #define PXENV_STATUS_BSTRAP_MISSING_LIST                               0x0077
00171 #define PXENV_STATUS_BSTRAP_NO_RESPONSE                                0x0078
00172 #define PXENV_STATUS_BSTRAP_FILE_TOO_BIG                               0x0079
00173 
00174 /* Environment NBP errors (0x0080 to 0x008f) */
00175 
00176 /* Reserved errors (0x0090 to 0x009f) */
00177 
00178 /* Miscellaneous errors (0x00a0 to 0x00af) */
00179 #define PXENV_STATUS_BINL_CANCELED_BY_KEYSTROKE                        0x00a0
00180 #define PXENV_STATUS_BINL_NO_PXE_SERVER                                0x00a1
00181 #define PXENV_STATUS_NOT_AVAILABLE_IN_PMODE                            0x00a2
00182 #define PXENV_STATUS_NOT_AVAILABLE_IN_RMODE                            0x00a3
00183 
00184 /* BUSD errors (0x00b0 to 0x00bf) */
00185 #define PXENV_STATUS_BUSD_DEVICE_NOT_SUPPORTED                         0x00b0
00186 
00187 /* Loader errors (0x00c0 to 0x00cf) */
00188 #define PXENV_STATUS_LOADER_NO_FREE_BASE_MEMORY                        0x00c0
00189 #define PXENV_STATUS_LOADER_NO_BC_ROMID                                0x00c1
00190 #define PXENV_STATUS_LOADER_BAD_BC_ROMID                               0x00c2
00191 #define PXENV_STATUS_LOADER_BAD_BC_RUNTIME_IMAGE                       0x00c3
00192 #define PXENV_STATUS_LOADER_NO_UNDI_ROMID                              0x00c4
00193 #define PXENV_STATUS_LOADER_BAD_UNDI_ROMID                             0x00c5
00194 #define PXENV_STATUS_LOADER_BAD_UNDI_DRIVER_IMAGE                      0x00c6
00195 #define PXENV_STATUS_LOADER_NO_PXE_STRUCT                              0x00c8
00196 #define PXENV_STATUS_LOADER_NO_PXENV_STRUCT                            0x00c9
00197 #define PXENV_STATUS_LOADER_UNDI_START                                 0x00ca
00198 #define PXENV_STATUS_LOADER_BC_START                                   0x00cb
00199 
00200 /** @} */
00201 
00202 /**
00203  * @defgroup posixerrors POSIX error codes
00204  *
00205  * The names and meanings (but not the values) of these error codes
00206  * are defined by POSIX.  We choose to assign unique values which
00207  * incorporate the closest equivalent PXE error code, so that code may
00208  * simply use ENOMEM, rather than having to use the cumbersome
00209  * (ENOMEM|PXENV_STATUS_OUT_OF_RESOURCES).
00210  *
00211  * @{
00212  */
00213 
00214 /** Operation completed successfully */
00215 #define ENOERR                  ( ERRFILE | PXENV_STATUS_SUCCESS | 0x00000000 )
00216 
00217 /** Arg list too long */
00218 #define E2BIG                  ( ERRFILE | PXENV_STATUS_BAD_FUNC | 0x01000000 )
00219 
00220 /** Permission denied */
00221 #define EACCES    ( ERRFILE | PXENV_STATUS_TFTP_ACCESS_VIOLATION | 0x02000000 )
00222 
00223 /** Address in use */
00224 #define EADDRINUSE             ( ERRFILE | PXENV_STATUS_UDP_OPEN | 0x03000000 )
00225 
00226 /** Address not available */
00227 #define EADDRNOTAVAIL          ( ERRFILE | PXENV_STATUS_UDP_OPEN | 0x04000000 )
00228 
00229 /** Address family not supported */
00230 #define EAFNOSUPPORT        ( ERRFILE | PXENV_STATUS_UNSUPPORTED | 0x05000000 )
00231 
00232 /** Resource temporarily unavailable */
00233 #define EAGAIN                  ( ERRFILE | PXENV_STATUS_FAILURE | 0x06000000 )
00234 
00235 /** Connection already in progress */
00236 #define EALREADY               ( ERRFILE | PXENV_STATUS_UDP_OPEN | 0x07000000 )
00237 
00238 /** Bad file descriptor */
00239 #define EBADF               ( ERRFILE | PXENV_STATUS_TFTP_CLOSED | 0x08000000 )
00240 
00241 /** Bad message */
00242 #define EBADMSG                 ( ERRFILE | PXENV_STATUS_FAILURE | 0x09000000 )
00243 
00244 /** Resource busy */
00245 #define EBUSY          ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x0a000000 )
00246 
00247 /** Operation canceled */
00248 #define ECANCELED \
00249              ( ERRFILE | PXENV_STATUS_BINL_CANCELED_BY_KEYSTROKE | 0x0b000000 )
00250 
00251 /** No child processes */
00252 #define ECHILD      ( ERRFILE | PXENV_STATUS_TFTP_FILE_NOT_FOUND | 0x0c000000 )
00253 
00254 /** Connection aborted */
00255 #define ECONNABORTED \
00256        ( ERRFILE | PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION | 0x0d000000 )
00257 
00258 /** Connection refused */
00259 #define ECONNREFUSED \
00260             ( ERRFILE | PXENV_STATUS_TFTP_CANNOT_OPEN_CONNECTION | 0x0e000000 )
00261 
00262 /** Connection reset */
00263 #define ECONNRESET \
00264        ( ERRFILE | PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION | 0x0f000000 )
00265 
00266 /** Resource deadlock avoided */
00267 #define EDEADLK                 ( ERRFILE | PXENV_STATUS_FAILURE | 0x10000000 )
00268 
00269 /** Destination address required */
00270 #define EDESTADDRREQ           ( ERRFILE | PXENV_STATUS_BAD_FUNC | 0x11000000 )
00271 
00272 /** Domain error */
00273 #define EDOM                    ( ERRFILE | PXENV_STATUS_FAILURE | 0x12000000 )
00274 
00275 /** Reserved */
00276 #define EDQUOT                  ( ERRFILE | PXENV_STATUS_FAILURE | 0x13000000 )
00277 
00278 /** File exists */
00279 #define EEXIST                  ( ERRFILE | PXENV_STATUS_FAILURE | 0x14000000 )
00280 
00281 /** Bad address */
00282 #define EFAULT            ( ERRFILE | PXENV_STATUS_MCOPY_PROBLEM | 0x15000000 )
00283 
00284 /** File too large */
00285 #define EFBIG             ( ERRFILE | PXENV_STATUS_MCOPY_PROBLEM | 0x16000000 )
00286 
00287 /** Host is unreachable */
00288 #define EHOSTUNREACH        ( ERRFILE | PXENV_STATUS_ARP_TIMEOUT | 0x17000000 )
00289 
00290 /** Identifier removed */
00291 #define EIDRM                   ( ERRFILE | PXENV_STATUS_FAILURE | 0x18000000 )
00292 
00293 /** Illegal byte sequence */
00294 #define EILSEQ                  ( ERRFILE | PXENV_STATUS_FAILURE | 0x19000000 )
00295 
00296 /** Operation in progress */
00297 #define EINPROGRESS             ( ERRFILE | PXENV_STATUS_FAILURE | 0x1a000000 )
00298 
00299 /** Interrupted function call */
00300 #define EINTR                   ( ERRFILE | PXENV_STATUS_FAILURE | 0x1b000000 )
00301 
00302 /** Invalid argument */
00303 #define EINVAL                 ( ERRFILE | PXENV_STATUS_BAD_FUNC | 0x1c000000 )
00304 
00305 /** Input/output error */
00306 #define EIO \
00307        ( ERRFILE | PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION | 0x1d000000 )
00308 
00309 /** Socket is connected */
00310 #define EISCONN                ( ERRFILE | PXENV_STATUS_UDP_OPEN | 0x1e000000 )
00311 
00312 /** Is a directory */
00313 #define EISDIR                  ( ERRFILE | PXENV_STATUS_FAILURE | 0x1f000000 )
00314 
00315 /** Too many levels of symbolic links */
00316 #define ELOOP                   ( ERRFILE | PXENV_STATUS_FAILURE | 0x20000000 )
00317 
00318 /** Too many open files */
00319 #define EMFILE         ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x21000000 )
00320 
00321 /** Too many links */
00322 #define EMLINK                  ( ERRFILE | PXENV_STATUS_FAILURE | 0x22000000 )
00323 
00324 /** Inappropriate message buffer length */
00325 #define EMSGSIZE               ( ERRFILE | PXENV_STATUS_BAD_FUNC | 0x23000000 )
00326 
00327 /** Reserved */
00328 #define EMULTIHOP               ( ERRFILE | PXENV_STATUS_FAILURE | 0x24000000 )
00329 
00330 /** Filename too long */
00331 #define ENAMETOOLONG            ( ERRFILE | PXENV_STATUS_FAILURE | 0x25000000 )
00332 
00333 /** Network is down */
00334 #define ENETDOWN            ( ERRFILE | PXENV_STATUS_ARP_TIMEOUT | 0x26000000 )
00335 
00336 /** Connection aborted by network */
00337 #define ENETRESET               ( ERRFILE | PXENV_STATUS_FAILURE | 0x27000000 )
00338 
00339 /** Network unreachable */
00340 #define ENETUNREACH         ( ERRFILE | PXENV_STATUS_ARP_TIMEOUT | 0x28000000 )
00341 
00342 /** Too many open files in system */
00343 #define ENFILE         ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x29000000 )
00344 
00345 /** No buffer space available */
00346 #define ENOBUFS        ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x2a000000 )
00347 
00348 /** No message is available on the STREAM head read queue */
00349 #define ENODATA                 ( ERRFILE | PXENV_STATUS_FAILURE | 0x2b000000 )
00350 
00351 /** No such device */
00352 #define ENODEV      ( ERRFILE | PXENV_STATUS_TFTP_FILE_NOT_FOUND | 0x2c000000 )
00353 
00354 /** No such file or directory */
00355 #define ENOENT      ( ERRFILE | PXENV_STATUS_TFTP_FILE_NOT_FOUND | 0x2d000000 )
00356 
00357 /** Exec format error */
00358 #define ENOEXEC                 ( ERRFILE | PXENV_STATUS_FAILURE | 0x2e000000 )
00359 
00360 /** No locks available */
00361 #define ENOLCK                  ( ERRFILE | PXENV_STATUS_FAILURE | 0x2f000000 )
00362 
00363 /** Reserved */
00364 #define ENOLINK                 ( ERRFILE | PXENV_STATUS_FAILURE | 0x30000000 )
00365 
00366 /** Not enough space */
00367 #define ENOMEM         ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x31000000 )
00368 
00369 /** No message of the desired type */
00370 #define ENOMSG                  ( ERRFILE | PXENV_STATUS_FAILURE | 0x32000000 )
00371 
00372 /** Protocol not available */
00373 #define ENOPROTOOPT         ( ERRFILE | PXENV_STATUS_UNSUPPORTED | 0x33000000 )
00374 
00375 /** No space left on device */
00376 #define ENOSPC         ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x34000000 )
00377 
00378 /** No STREAM resources */
00379 #define ENOSR          ( ERRFILE | PXENV_STATUS_OUT_OF_RESOURCES | 0x35000000 )
00380 
00381 /** Not a STREAM */
00382 #define ENOSTR                  ( ERRFILE | PXENV_STATUS_FAILURE | 0x36000000 )
00383 
00384 /** Function not implemented */
00385 #define ENOSYS              ( ERRFILE | PXENV_STATUS_UNSUPPORTED | 0x37000000 )
00386 
00387 /** The socket is not connected */
00388 #define ENOTCONN                ( ERRFILE | PXENV_STATUS_FAILURE | 0x38000000 )
00389 
00390 /** Not a directory */
00391 #define ENOTDIR                 ( ERRFILE | PXENV_STATUS_FAILURE | 0x39000000 )
00392 
00393 /** Directory not empty */
00394 #define ENOTEMPTY               ( ERRFILE | PXENV_STATUS_FAILURE | 0x3a000000 )
00395 
00396 /** Not a socket */
00397 #define ENOTSOCK                ( ERRFILE | PXENV_STATUS_FAILURE | 0x3b000000 )
00398 
00399 /** Not supported */
00400 #define ENOTSUP             ( ERRFILE | PXENV_STATUS_UNSUPPORTED | 0x3c000000 )
00401 
00402 /** Inappropriate I/O control operation */
00403 #define ENOTTY                  ( ERRFILE | PXENV_STATUS_FAILURE | 0x3d000000 )
00404 
00405 /** No such device or address */
00406 #define ENXIO       ( ERRFILE | PXENV_STATUS_TFTP_FILE_NOT_FOUND | 0x3e000000 )
00407 
00408 /** Operation not supported on socket */
00409 #define EOPNOTSUPP          ( ERRFILE | PXENV_STATUS_UNSUPPORTED | 0x3f000000 )
00410 
00411 /** Value too large to be stored in data type */
00412 #define EOVERFLOW               ( ERRFILE | PXENV_STATUS_FAILURE | 0x40000000 )
00413 
00414 /** Operation not permitted */
00415 #define EPERM     ( ERRFILE | PXENV_STATUS_TFTP_ACCESS_VIOLATION | 0x41000000 )
00416 
00417 /** Broken pipe */
00418 #define EPIPE                   ( ERRFILE | PXENV_STATUS_FAILURE | 0x42000000 )
00419 
00420 /** Protocol error */
00421 #define EPROTO                  ( ERRFILE | PXENV_STATUS_FAILURE | 0x43000000 )
00422 
00423 /** Protocol not supported */
00424 #define EPROTONOSUPPORT     ( ERRFILE | PXENV_STATUS_UNSUPPORTED | 0x44000000 )
00425 
00426 /** Protocol wrong type for socket */
00427 #define EPROTOTYPE              ( ERRFILE | PXENV_STATUS_FAILURE | 0x45000000 )
00428 
00429 /** Result too large */
00430 #define ERANGE                  ( ERRFILE | PXENV_STATUS_FAILURE | 0x46000000 )
00431 
00432 /** Read-only file system */
00433 #define EROFS                   ( ERRFILE | PXENV_STATUS_FAILURE | 0x47000000 )
00434 
00435 /** Invalid seek */
00436 #define ESPIPE                  ( ERRFILE | PXENV_STATUS_FAILURE | 0x48000000 )
00437 
00438 /** No such process */
00439 #define ESRCH       ( ERRFILE | PXENV_STATUS_TFTP_FILE_NOT_FOUND | 0x49000000 )
00440 
00441 /** Stale file handle */
00442 #define ESTALE                  ( ERRFILE | PXENV_STATUS_FAILURE | 0x4a000000 )
00443 
00444 /** STREAM ioctl() timeout */
00445 #define ETIME                   ( ERRFILE | PXENV_STATUS_FAILURE | 0x4b000000 )
00446 
00447 /** Operation timed out */
00448 #define ETIMEDOUT     ( ERRFILE | PXENV_STATUS_TFTP_READ_TIMEOUT | 0x4c000000 )
00449 
00450 /** Text file busy */
00451 #define ETXTBSY                 ( ERRFILE | PXENV_STATUS_FAILURE | 0x4d000000 )
00452 
00453 /** Operation would block (different from EAGAIN!) */
00454 #define EWOULDBLOCK           ( ERRFILE | PXENV_STATUS_TFTP_OPEN | 0x4e000000 )
00455 
00456 /** Improper link */
00457 #define EXDEV                   ( ERRFILE | PXENV_STATUS_FAILURE | 0x4f000000 )
00458 
00459 /** @} */
00460 
00461 /**
00462  * @defgroup euniq Per-file error disambiguators
00463  *
00464  * Files which use the same error number multiple times should
00465  * probably define their own error subspace using these
00466  * disambiguators.  For example:
00467  *
00468  *     #define ETCP_HEADER_TOO_SHORT    EUNIQ_01
00469  *     #define ETCP_BAD_CHECKSUM        EUNIQ_02
00470  *
00471  * @{
00472  */
00473 
00474 #define EUNIQ_01        0x00000100
00475 #define EUNIQ_02        0x00000200
00476 #define EUNIQ_03        0x00000300
00477 #define EUNIQ_04        0x00000400
00478 #define EUNIQ_05        0x00000500
00479 #define EUNIQ_06        0x00000600
00480 #define EUNIQ_07        0x00000700
00481 #define EUNIQ_08        0x00000800
00482 #define EUNIQ_09        0x00000900
00483 #define EUNIQ_0A        0x00000a00
00484 #define EUNIQ_0B        0x00000b00
00485 #define EUNIQ_0C        0x00000c00
00486 #define EUNIQ_0D        0x00000d00
00487 #define EUNIQ_0E        0x00000e00
00488 #define EUNIQ_0F        0x00000f00
00489 #define EUNIQ_10        0x00001000
00490 #define EUNIQ_11        0x00001100
00491 #define EUNIQ_12        0x00001200
00492 #define EUNIQ_13        0x00001300
00493 #define EUNIQ_14        0x00001400
00494 #define EUNIQ_15        0x00001500
00495 #define EUNIQ_16        0x00001600
00496 #define EUNIQ_17        0x00001700
00497 #define EUNIQ_18        0x00001800
00498 #define EUNIQ_19        0x00001900
00499 #define EUNIQ_1A        0x00001a00
00500 #define EUNIQ_1B        0x00001b00
00501 #define EUNIQ_1C        0x00001c00
00502 #define EUNIQ_1D        0x00001d00
00503 #define EUNIQ_1E        0x00001e00
00504 #define EUNIQ_1F        0x00001f00
00505 
00506 /** @} */
00507 
00508 extern int errno;
00509 
00510 #endif /* ERRNO_H */

Generated on Tue Apr 6 20:01:06 2010 for gPXE by  doxygen 1.5.7.1