iPXE
linux.h
Go to the documentation of this file.
00001 #ifndef _IPXE_ERRNO_LINUX_H
00002 #define _IPXE_ERRNO_LINUX_H
00003 
00004 /**
00005  * @file
00006  *
00007  * Linux platform error codes
00008  *
00009  * Linux error codes all fit inside 8 bits, so we just use them
00010  * directly as our platform error codes.
00011  */
00012 
00013 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
00014 
00015 /**
00016  * Convert platform error code to platform component of iPXE error code
00017  *
00018  * @v platform          Platform error code
00019  * @ret errno           Platform component of iPXE error code
00020  */
00021 #define PLATFORM_TO_ERRNO( platform ) ( (platform) & 0xff )
00022 
00023 /**
00024  * Convert iPXE error code to platform error code
00025  *
00026  * @v errno             iPXE error code
00027  * @ret platform        Platform error code
00028  */
00029 #define ERRNO_TO_PLATFORM( errno ) ( (errno) & 0xff )
00030 
00031 /* Platform-specific error codes */
00032 #define PLATFORM_ENOERR 0
00033 #define PLATFORM_E2BIG 7
00034 #define PLATFORM_EACCES 13
00035 #define PLATFORM_EADDRINUSE 98
00036 #define PLATFORM_EADDRNOTAVAIL 99
00037 #define PLATFORM_EAFNOSUPPORT 97
00038 #define PLATFORM_EAGAIN 11
00039 #define PLATFORM_EALREADY 114
00040 #define PLATFORM_EBADF 9
00041 #define PLATFORM_EBADMSG 74
00042 #define PLATFORM_EBUSY 16
00043 #define PLATFORM_ECANCELED 125
00044 #define PLATFORM_ECHILD 10
00045 #define PLATFORM_ECONNABORTED 103
00046 #define PLATFORM_ECONNREFUSED 111
00047 #define PLATFORM_ECONNRESET 104
00048 #define PLATFORM_EDEADLK 35
00049 #define PLATFORM_EDESTADDRREQ 89
00050 #define PLATFORM_EDOM 33
00051 #define PLATFORM_EDQUOT 122
00052 #define PLATFORM_EEXIST 17
00053 #define PLATFORM_EFAULT 14
00054 #define PLATFORM_EFBIG 27
00055 #define PLATFORM_EHOSTUNREACH 113
00056 #define PLATFORM_EIDRM 43
00057 #define PLATFORM_EILSEQ 84
00058 #define PLATFORM_EINPROGRESS 115
00059 #define PLATFORM_EINTR 4
00060 #define PLATFORM_EINVAL 22
00061 #define PLATFORM_EIO 5
00062 #define PLATFORM_EISCONN 106
00063 #define PLATFORM_EISDIR 21
00064 #define PLATFORM_ELOOP 40
00065 #define PLATFORM_EMFILE 24
00066 #define PLATFORM_EMLINK 31
00067 #define PLATFORM_EMSGSIZE 90
00068 #define PLATFORM_EMULTIHOP 72
00069 #define PLATFORM_ENAMETOOLONG 36
00070 #define PLATFORM_ENETDOWN 100
00071 #define PLATFORM_ENETRESET 102
00072 #define PLATFORM_ENETUNREACH 101
00073 #define PLATFORM_ENFILE 23
00074 #define PLATFORM_ENOBUFS 105
00075 #define PLATFORM_ENODATA 61
00076 #define PLATFORM_ENODEV 19
00077 #define PLATFORM_ENOENT 2
00078 #define PLATFORM_ENOEXEC 8
00079 #define PLATFORM_ENOLCK 37
00080 #define PLATFORM_ENOLINK 67
00081 #define PLATFORM_ENOMEM 12
00082 #define PLATFORM_ENOMSG 42
00083 #define PLATFORM_ENOPROTOOPT 92
00084 #define PLATFORM_ENOSPC 28
00085 #define PLATFORM_ENOSR 63
00086 #define PLATFORM_ENOSTR 60
00087 #define PLATFORM_ENOSYS 38
00088 #define PLATFORM_ENOTCONN 107
00089 #define PLATFORM_ENOTDIR 20
00090 #define PLATFORM_ENOTEMPTY 39
00091 #define PLATFORM_ENOTSOCK 88
00092 #define PLATFORM_ENOTSUP PLATFORM_EOPNOTSUPP
00093 #define PLATFORM_ENOTTY 25
00094 #define PLATFORM_ENXIO 6
00095 #define PLATFORM_EOPNOTSUPP 95
00096 #define PLATFORM_EOVERFLOW 75
00097 #define PLATFORM_EPERM 1
00098 #define PLATFORM_EPIPE 32
00099 #define PLATFORM_EPROTO 71
00100 #define PLATFORM_EPROTONOSUPPORT 93
00101 #define PLATFORM_EPROTOTYPE 91
00102 #define PLATFORM_ERANGE 34
00103 #define PLATFORM_EROFS 30
00104 #define PLATFORM_ESPIPE 29
00105 #define PLATFORM_ESRCH 3
00106 #define PLATFORM_ESTALE 116
00107 #define PLATFORM_ETIME 62
00108 #define PLATFORM_ETIMEDOUT 110
00109 #define PLATFORM_ETXTBSY 26
00110 #define PLATFORM_EWOULDBLOCK PLATFORM_EAGAIN
00111 #define PLATFORM_EXDEV 18
00112 
00113 #endif /* _IPXE_ERRNO_LINUX_H */