1 #[repr(i32)] 2 #[derive(Debug, FromPrimitive)] 3 #[allow(dead_code)] 4 pub enum SystemError { 5 /// 参数列表过长,或者在输出buffer中缺少空间 或者参数比系统内建的最大值要大 Argument list too long. 6 E2BIG = 1, 7 /// 访问被拒绝 Permission denied 8 EACCES = 2, 9 /// 地址正在被使用 Address in use. 10 EADDRINUSE = 3, 11 /// 地址不可用 Address not available. 12 EADDRNOTAVAIL = 4, 13 /// 地址family不支持 Address family not supported. 14 EAFNOSUPPORT = 5, 15 /// 资源不可用,请重试。 Resource unavailable, try again (may be the same value as [EWOULDBLOCK]) 16 EAGAIN = 6, 17 /// 连接已经在处理 Connection already in progress. 18 EALREADY = 7, 19 /// 错误的文件描述符 Bad file descriptor. 20 EBADF = 8, 21 /// 错误的消息 Bad message. 22 EBADMSG = 9, 23 /// 设备或资源忙 Device or resource busy. 24 EBUSY = 10, 25 /// 操作被取消 Operation canceled. 26 ECANCELED = 11, 27 /// 没有子进程 No child processes. 28 ECHILD = 12, 29 /// 连接已断开 Connection aborted. 30 ECONNABORTED = 13, 31 /// 连接被拒绝 Connection refused. 32 ECONNREFUSED = 14, 33 /// 连接被重置 Connection reset. 34 ECONNRESET = 15, 35 /// 资源死锁将要发生 Resource deadlock would occur. 36 EDEADLK = 16, 37 /// 需要目标地址 Destination address required. 38 EDESTADDRREQ = 17, 39 /// 数学参数超出作用域 Mathematics argument out of domain of function. 40 EDOM = 18, 41 /// 保留使用 Reserved 42 EDQUOT = 19, 43 /// 文件已存在 File exists. 44 EEXIST = 20, 45 /// 错误的地址 Bad address 46 EFAULT = 21, 47 /// 文件太大 File too large. 48 EFBIG = 22, 49 /// 主机不可达 Host is unreachable. 50 EHOSTUNREACH = 23, 51 /// 标志符被移除 Identifier removed. 52 EIDRM = 24, 53 /// 不合法的字符序列 Illegal byte sequence. 54 EILSEQ = 25, 55 /// 操作正在处理 Operation in progress. 56 EINPROGRESS = 26, 57 /// 被中断的函数 Interrupted function. 58 EINTR = 27, 59 /// 不可用的参数 Invalid argument. 60 EINVAL = 28, 61 /// I/O错误 I/O error. 62 EIO = 29, 63 /// 套接字已连接 Socket is connected. 64 EISCONN = 30, 65 /// 是一个目录 Is a directory 66 EISDIR = 31, 67 /// 符号链接级别过多 Too many levels of symbolic links. 68 ELOOP = 32, 69 /// 文件描述符的值过大 File descriptor value too large. 70 EMFILE = 33, 71 /// 链接数过多 Too many links. 72 EMLINK = 34, 73 /// 消息过大 Message too large. 74 EMSGSIZE = 35, 75 /// 保留使用 Reserved. 76 EMULTIHOP = 36, 77 /// 文件名过长 Filename too long. 78 ENAMETOOLONG = 37, 79 /// 网络已关闭 Network is down. 80 ENETDOWN = 38, 81 /// 网络连接已断开 Connection aborted by network. 82 ENETRESET = 39, 83 /// 网络不可达 Network unreachable. 84 ENETUNREACH = 40, 85 /// 系统中打开的文件过多 Too many files open in system. 86 ENFILE = 41, 87 /// 缓冲区空间不足 No buffer space available. 88 ENOBUFS = 42, 89 /// 队列头没有可读取的消息 No message is available on the STREAM head read queue. 90 ENODATA = 43, 91 /// 没有指定的设备 No such device. 92 ENODEV = 44, 93 /// 没有指定的文件或目录 No such file or directory. 94 ENOENT = 45, 95 /// 可执行文件格式错误 Executable file format error 96 ENOEXEC = 46, 97 /// 没有可用的锁 No locks available. 98 ENOLCK = 47, 99 /// 保留 Reserved. 100 ENOLINK = 48, 101 /// 没有足够的空间 Not enough space. 102 ENOMEM = 49, 103 /// 没有期待类型的消息 No message of the desired type. 104 ENOMSG = 50, 105 /// 协议不可用 Protocol not available. 106 ENOPROTOOPT = 51, 107 /// 设备上没有空间 No space left on device. 108 ENOSPC = 52, 109 /// 没有STREAM资源 No STREAM resources. 110 ENOSR = 53, 111 /// 不是STREAM Not a STREAM 112 ENOSTR = 54, 113 /// 功能不支持 Function not supported. 114 ENOSYS = 55, 115 /// 套接字未连接 The socket is not connected. 116 ENOTCONN = 56, 117 /// 不是目录 Not a directory. 118 ENOTDIR = 57, 119 /// 目录非空 Directory not empty. 120 ENOTEMPTY = 58, 121 /// 状态不可恢复 State not recoverable. 122 ENOTRECOVERABLE = 59, 123 /// 不是一个套接字 Not a socket. 124 ENOTSOCK = 60, 125 /// 不被支持 Not supported (may be the same value as [EOPNOTSUPP]). 126 ENOTSUP = 61, 127 /// 不正确的I/O控制操作 Inappropriate I/O control operation. 128 ENOTTY = 62, 129 /// 没有这样的设备或地址 No such device or address. 130 ENXIO = 63, 131 /// 套接字不支持该操作 Operation not supported on socket (may be the same value as [ENOTSUP]). 132 EOPNOTSUPP = 64, 133 /// 数值过大,产生溢出 Value too large to be stored in data type. 134 EOVERFLOW = 65, 135 /// 之前的拥有者挂了 Previous owner died. 136 EOWNERDEAD = 66, 137 /// 操作不被允许 Operation not permitted. 138 EPERM = 67, 139 /// 断开的管道 Broken pipe. 140 EPIPE = 68, 141 /// 协议错误 Protocol error. 142 EPROTO = 69, 143 /// 协议不被支持 Protocol not supported. 144 EPROTONOSUPPORT = 70, 145 /// 对于套接字而言,错误的协议 Protocol wrong type for socket. 146 EPROTOTYPE = 71, 147 /// 结果过大 Result too large. 148 ERANGE = 72, 149 /// 只读的文件系统 Read-only file system. 150 EROFS = 73, 151 /// 错误的寻道.当前文件是pipe,不允许seek请求 Invalid seek. 152 ESPIPE = 74, 153 /// 没有这样的进程 No such process. 154 ESRCH = 75, 155 /// 保留 Reserved. 156 ESTALE = 76, 157 /// 流式ioctl()超时 Stream ioctl() timeout 158 ETIME = 77, 159 /// 连接超时 Connection timed out. 160 ETIMEDOUT = 78, 161 /// 文本文件忙 Text file busy. 162 ETXTBSY = 79, 163 /// 操作将被禁止 Operation would block (may be the same value as [EAGAIN]). 164 EWOULDBLOCK = 80, 165 /// 跨设备连接 Cross-device link. 166 EXDEV = 81, 167 } 168