1 2 #[repr(i32)] 3 #[derive(Debug, PartialEq, Eq, Clone)] 4 #[allow(dead_code, non_camel_case_types)] 5 pub enum SystemError { 6 EPERM = 1, 7 /// 没有指定的文件或目录 No such file or directory. 8 ENOENT = 2, 9 /// 没有这样的进程 No such process. 10 ESRCH = 3, 11 /// 被中断的函数 Interrupted function. 12 EINTR = 4, 13 /// I/O错误 I/O error. 14 EIO = 5, 15 /// 没有这样的设备或地址 No such device or address. 16 ENXIO = 6, 17 /// 参数列表过长,或者在输出buffer中缺少空间 或者参数比系统内建的最大值要大 Argument list too long. 18 E2BIG = 7, 19 /// 可执行文件格式错误 Executable file format error 20 ENOEXEC = 8, 21 /// 错误的文件描述符 Bad file descriptor. 22 EBADF = 9, 23 /// 没有子进程 No child processes. 24 ECHILD = 10, 25 /// 资源不可用,请重试。 Resource unavailable, try again.(may be the same value as [EWOULDBLOCK]) 26 /// 27 /// 操作将被禁止 Operation would block.(may be the same value as [EAGAIN]). 28 EAGAIN_OR_EWOULDBLOCK = 11, 29 /// 没有足够的空间 Not enough space. 30 ENOMEM = 12, 31 /// 访问被拒绝 Permission denied 32 EACCES = 13, 33 /// 错误的地址 Bad address 34 EFAULT = 14, 35 /// 需要块设备 Block device required 36 ENOTBLK = 15, 37 /// 设备或资源忙 Device or resource busy. 38 EBUSY = 16, 39 /// 文件已存在 File exists. 40 EEXIST = 17, 41 /// 跨设备连接 Cross-device link. 42 EXDEV = 18, 43 /// 没有指定的设备 No such device. 44 ENODEV = 19, 45 /// 不是目录 Not a directory. 46 ENOTDIR = 20, 47 /// 是一个目录 Is a directory 48 EISDIR = 21, 49 /// 不可用的参数 Invalid argument. 50 EINVAL = 22, 51 /// 系统中打开的文件过多 Too many files open in system. 52 ENFILE = 23, 53 /// 文件描述符的值过大 File descriptor value too large. 54 EMFILE = 24, 55 /// 不正确的I/O控制操作 Inappropriate I/O control operation. 56 ENOTTY = 25, 57 /// 文本文件忙 Text file busy. 58 ETXTBSY = 26, 59 /// 文件太大 File too large. 60 EFBIG = 27, 61 /// 设备上没有空间 No space left on device. 62 ENOSPC = 28, 63 /// 错误的寻道.当前文件是pipe,不允许seek请求 Invalid seek. 64 ESPIPE = 29, 65 /// 只读的文件系统 Read-only file system. 66 EROFS = 30, 67 /// 链接数过多 Too many links. 68 EMLINK = 31, 69 /// 断开的管道 Broken pipe. 70 EPIPE = 32, 71 /// 数学参数超出作用域 Mathematics argument out of domain of function. 72 EDOM = 33, 73 /// 结果过大 Result too large. 74 ERANGE = 34, 75 }