Linux错误码中文注释
作者 | 将狼才鲸 |
---|---|
创建日期 | 2023-03-04 |
/******************************************************************************
* \brief 错误码
* \note 基于linux_6.1-rc4\include\uapi\asm-generic\errno-base.h
* linux_6.1-rc4\tools\arch\alpha\include\uapi\asm\errno.h
* linux_6.1-rc4\include\linux\errno.h
* \author 将狼才鲸
* \date 2023-03-04
******************************************************************************/
#ifndef _UTIL_ERRNO_H_
#define _UTIL_ERRNO_H_
/*********************************** 宏定义 ***********************************/
#define EPERM 1 /* 操作不允许 */
#define ENOENT 2 /* 没有此文件或目录 */
#define ESRCH 3 /* 进程不存在 */
#define EINTR 4 /* 系统调用被中断,Interrupted system call */
#define EIO 5 /* 读写错误,I/O error */
#define ENXIO 6 /* 没有此设备或地址 */
#define E2BIG 7 /* 参数列表太长 */
#define ENOEXEC 8 /* 执行格式错误,Exec format error */
#define EBADF 9 /* 错误的文件号,Bad file number */
#define ECHILD 10 /* 没有该子进程,No child processes */
#define EAGAIN 11 /* 请重试,Try again */
#define ENOMEM 12 /* 内存不足,Out of memory */
#define EACCES 13 /* 没有权限 */
#define EFAULT 14 /* 非法地址,Bad address */
#define ENOTBLK 15 /* 没有块设备,Block device required */
#define EBUSY 16 /* 设备或资源忙,Device or resource busy */
#define EEXIST 17 /* 文件已存在,File exists */
#define EXDEV 18 /* 链接不在同一个设备,Cross-device link */
#define ENODEV 19 /* 无此设备,No such device */
#define ENOTDIR 20 /* 不是文件夹,Not a directory */
#define EISDIR 21 /* 是文件夹,Is a directory */
#define EINVAL 22 /* 参数非法,Invalid argument */
#define ENFILE 23 /* 文件表溢出,File table overflow */
#define EMFILE 24 /* 文件打开太多,Too many open files */
#define ENOTTY 25 /* 不是字符设备,Not a typewriter */
#define ETXTBSY 26 /* 文本文件忙,Text file busy */
#define EFBIG 27 /* 文件太大,File too large */
#define ENOSPC 28 /* 设备空间不足,No space left on device */
#define ESPIPE 29 /* 非法跳转,Illegal seek */
#define EROFS 30 /* 文件系统只读,Read-only file system */
#define EMLINK 31 /* 链接太多,Too many links */
#define EPIPE 32 /* 管道损坏,Broken pipe */
#define EDOM 33 /* 参数超出函数范围,Math argument out of domain of func */
#define ERANGE 34 /* 结果不能表示,超出范围 */
#define EAGAIN 35 /* 请重试,Try again */
#define EWOULDBLOCK EAGAIN /* 操作被阻塞,Operation would block */
#define EINPROGRESS 36 /* 操作正在处理中,Operation now in progress */
#define EALREADY 37 /* 操作已就绪,Operation already in progress */
#define ENOTSOCK 38 /* Socket operation on non-socket */
#define EDESTADDRREQ 39 /* 需要目的地址,Destination address required */
#define EMSGSIZE 40 /* 消息太长,Message too long */
#define EPROTOTYPE 41 /* 协议类型错误,Protocol wrong type for socket */
#define ENOPROTOOPT 42 /* 协议不可用,Protocol not available */
#define EPROTONOSUPPORT 43 /* 协议不支持,Protocol not supported */
#define ESOCKTNOSUPPORT 44 /* Socket类型不支持,Socket type not supported */
#define EOPNOTSUPP 45 /* 在该传输端点上操作不支持,Operation not supported on transport endpoint */
#define EPFNOSUPPORT 46 /* 协议族不支持,Protocol family not supported */
#define EAFNOSUPPORT 47 /* 地址族不支持,Address family not supported by protocol */
#define EADDRINUSE 48 /* 地址已在使用,Address already in use */
#define EADDRNOTAVAIL 49 /* 所请求的地址无法分配,Cannot assign requested address */
#define ENETDOWN 50 /* 网络已断开,Network is down */
#define ENETUNREACH 51 /* 网络无法访问,Network is unreachable */
#define ENETRESET 52 /* 因为复位导致网络连接中断,Network dropped connection because of reset */
#define ECONNABORTED 53 /* 连接中止,Software caused connection abort */
#define ECONNRESET 54 /* 连接复位,Connection reset by peer */
#define ENOBUFS 55 /* 没有可用的缓存,No buffer space available */
#define EISCONN 56 /* 传输端点已连接,Transport endpoint is already connected */
#define ENOTCONN 57 /* 传输端点未连接,Transport endpoint is not connected */
#define ESHUTDOWN 58 /* 传输端点关闭后无法发送,Cannot send after transport endpoint shutdown */
#define ETOOMANYREFS 59 /* 引用太多无法拼接,Too many references: cannot splice */
#define ETIMEDOUT 60 /* 连接超时,Connection timed out */
#define ECONNREFUSED 61 /* 连接被拒绝,Connection refused */
#define ELOOP 62 /* 符号连接冲突太多 */
#define ENAMETOOLONG 63 /* 文件名太长,File name too long */
#define EHOSTDOWN 64 /* 主机已关闭,Host is down */
#define EHOSTUNREACH 65 /* 主机无路由,No route to host */
#define ENOTEMPTY 66 /* 文件夹非空,Directory not empty */
#define EUSERS 68 /* 用户太多,Too many users */
#define EDQUOT 69 /* 超出界限,Quota exceeded */
#define ESTALE 70 /* 旧的文件句柄,Stale file handle */
#define EREMOTE 71 /* 目标已移除,Object is remote */
#define ENOLCK 77 /* 没有可用的锁,No record locks available */
#define ENOSYS 78 /* 函数未实现 */
#define ENOMSG 80 /* 没有所需类型的消息,No message of desired type */
#define EIDRM 81 /* 标识符已删除,Identifier removed */
#define ENOSR 82 /* 没有流资源,Out of streams resources */
#define ETIME 83 /* 定时器超时,Timer expired */
#define EBADMSG 84 /* 不是数据消息 */
#define EPROTO 85 /* 协议错误,Protocol error */
#define ENODATA 86 /* 没有可用的数据,No data available */
#define ENOSTR 87 /* 不是流设备,Device not a stream */
#define ENOPKG 92 /* 包未安装,Package not installed */
#define EILSEQ 116 /* 字节序列非法Illegal byte sequence */
#define ECHRNG 88 /* 通道号超出范围,Channel number out of range */
#define EL2NSYNC 89 /* 级别2未同步,Level 2 not synchronized */
#define EL3HLT 90 /* 级别3中止,Level 3 halted */
#define EL3RST 91 /* 级别3复位,Level 3 reset */
#define ELNRNG 93 /* 链接号超出范围,Link number out of range */
#define EUNATCH 94 /* 协议驱动未附加,Protocol driver not attached */
#define ENOCSI 95 /* CSI结构不可用,No CSI structure available */
#define EL2HLT 96 /* 级别2中止,Level 2 halted */
#define EBADE 97 /* 无效的交换 */
#define EBADR 98 /* 无效的请求描述符 */
#define EXFULL 99 /* 交换已满,Exchange full */
#define ENOANO 100 /* 没有正极,No anode */
#define EBADRQC 101 /* 请求码无效,Invalid request code */
#define EBADSLT 102 /* Invalid slot */
#define EDEADLK 11 /* 将发生资源死锁,Resource deadlock would occur */
#define EDEADLOCK EDEADLK /* 发生死锁 */
#define EBFONT 104 /* 字库文件格式错误,Bad font file format */
#define ENONET 105 /* 设备未联网,Machine is not on the network */
#define ENOLINK 106 /* 链路已断,Link has been severed */
#define EADV 107 /* 广播错误,Advertise error */
#define ESRMNT 108 /* 挂载错误,Srmount error */
#define ECOMM 109 /* 发送时通信错误,Communication error on send */
#define EMULTIHOP 110 /* 尝试多跳,Multihop attempted */
#define EDOTDOT 111 /* RFS specific error */
#define EOVERFLOW 112 /* 参数溢出,对于已定义的数据类型来说值太大 */
#define ENOTUNIQ 113 /* 名称在网络上不唯一,Name not unique on network */
#define EBADFD 114 /* 文件描述符处于非法状态,File descriptor in bad state */
#define EREMCHG 115 /* 远端地址已改变,Remote address changed */
#define EUCLEAN 117 /* 结构需要清理,Structure needs cleaning */
#define ENOTNAM 118 /* 不是由XENIX命名的类型文件,Not a XENIX named type file */
#define ENAVAIL 119 /* 没有可用的XENIX信号量,No XENIX semaphores available */
#define EISNAM 120 /* 是一个已命名的文件,Is a named type file */
#define EREMOTEIO 121 /* 远端读写错误,Remote I/O error */
#define ELIBACC 122 /* 无法访问所需的共享库,Can not access a needed shared library */
#define ELIBBAD 123 /* 访问的共享库已损坏,Accessing a corrupted shared library */
#define ELIBSCN 124 /* a.out中的.lib部分已损坏,.lib section in a.out corrupted */
#define ELIBMAX 125 /* 试图链接的共享库太多,Attempting to link in too many shared libraries */
#define ELIBEXEC 126 /* 不能直接运行共享库,Cannot exec a shared library directly */
#define ERESTART 127 /* 应重新启动已中断的系统调用,Interrupted system call should be restarted */
#define ESTRPIPE 128 /* 流管道错误,Streams pipe error */
#define ENOMEDIUM 129 /* 找不到介质,No medium found */
#define EMEDIUMTYPE 130 /* 错误的介质类型,Wrong medium type */
#define ECANCELED 131 /* 操作已取消,Operation Cancelled */
#define ENOKEY 132 /* 所需键值不可用,Required key not available */
#define EKEYEXPIRED 133 /* 密钥已过期,Key has expired */
#define EKEYREVOKED 134 /* 密钥已吊销,Key has been revoked */
#define EKEYREJECTED 135 /* 密钥被服务拒绝,Key was rejected by service */
#define EOWNERDEAD 136 /* 拥有者已注销,Owner died */
#define ENOTRECOVERABLE 137 /* 状态不可恢复,State not recoverable */
#define ERFKILL 138 /* Operation not possible due to RF-kill */
#define EHWPOISON 139 /* 内存页硬件错误,Memory page has hardware error */
#define ERESTARTSYS 512 /* 系统重启 */
#define ERESTARTNOINTR 513 /* 无中断的系统重启 */
#define ERESTARTNOHAND 514 /* 无处理句柄的重启,restart if no handler.. */
#define ENOIOCTLCMD 515 /* 命令不存在,No ioctl command */
#define ERESTART_RESTARTBLOCK 516 /* 系统调用的重启,restart by calling sys_restart_syscall */
#define EPROBE_DEFER 517 /* 驱动需要重新探测,Driver requests probe retry */
#define EOPENSTALE 518 /* 打开时发现了一个旧入口,open found a stale dentry */
#define ENOPARAM 519 /* 参数不支持,Parameter not supported */
#define EBADHANDLE 521 /* 非法的NFS文件句柄,Illegal NFS file handle */
#define ENOTSYNC 522 /* 更新同步不匹配,Update synchronization mismatch */
#define EBADCOOKIE 523 /* Cookie太陈旧,Cookie is stale */
#define ENOTSUPP 524 /* 操作不支持,Operation is not supported */
#define ETOOSMALL 525 /* 缓存或请求太小,Buffer or request is too small */
#define ESERVERFAULT 526 /* 无法翻译,An untranslatable error occurred */
#define EBADTYPE 527 /* 服务器不支持的类型,Type not supported by server */
#define EJUKEBOX 528 /* 请求超时,Request initiated, but will not complete before timeout */
#define EIOCBQUEUED 529 /* io回调已推入队列,将得到完成标志,iocb queued, will get completion event */
#define ERECALLCONFLICT 530 /* 回调状态冲突,conflict with recalled state */
#define ENOGRACE 531 /* 拒绝取回NFS文件锁,NFS file lock reclaim refused */
#endif /* _UTIL_ERRNO_H_ */
/*********************************** 文件尾 ***********************************/
/******************************************************************************
- \brief 错误码
- \note 基于linux_6.1-rc4\include\uapi\asm-generic\errno-base.h
-
linux_6.1-rc4\tools\arch\alpha\include\uapi\asm\errno.h
-
linux_6.1-rc4\include\linux\errno.h
- \author 将狼才鲸
- \date 2023-03-04
******************************************************************************/
#ifndef UTIL_ERRNO_H
#define UTIL_ERRNO_H
/*********************************** 宏定义 **********************************/
#define EPERM 1 / 操作不允许 /
#define ENOENT 2 / 没有此文件或目录 /
#define ESRCH 3 / 进程不存在 /
#define EINTR 4 / 系统调用被中断,Interrupted system call */
#define EIO 5 /* 读写错误,I/O error /
#define ENXIO 6 / 没有此设备或地址 /
#define E2BIG 7 / 参数列表太长 /
#define ENOEXEC 8 / 执行格式错误,Exec format error /
#define EBADF 9 / 错误的文件号,Bad file number /
#define ECHILD 10 / 没有该子进程,No child processes */
#define EAGAIN 11 /* 请重试,Try again /
#define ENOMEM 12 / 内存不足,Out of memory /
#define EACCES 13 / 没有权限 /
#define EFAULT 14 / 非法地址,Bad address /
#define ENOTBLK 15 / 没有块设备,Block device required /
#define EBUSY 16 / 设备或资源忙,Device or resource busy /
#define EEXIST 17 / 文件已存在,File exists /
#define EXDEV 18 / 链接不在同一个设备,Cross-device link /
#define ENODEV 19 / 无此设备,No such device /
#define ENOTDIR 20 / 不是文件夹,Not a directory /
#define EISDIR 21 / 是文件夹,Is a directory */
#define EINVAL 22 /* 参数非法,Invalid argument /
#define ENFILE 23 / 文件表溢出,File table overflow /
#define EMFILE 24 / 文件打开太多,Too many open files /
#define ENOTTY 25 / 不是字符设备,Not a typewriter /
#define ETXTBSY 26 / 文本文件忙,Text file busy /
#define EFBIG 27 / 文件太大,File too large /
#define ENOSPC 28 / 设备空间不足,No space left on device /
#define ESPIPE 29 / 非法跳转,Illegal seek /
#define EROFS 30 / 文件系统只读,Read-only file system /
#define EMLINK 31 / 链接太多,Too many links /
#define EPIPE 32 / 管道损坏,Broken pipe /
#define EDOM 33 / 参数超出函数范围,Math argument out of domain of func /
#define ERANGE 34 / 结果不能表示,超出范围 */
#define EAGAIN 35 /* 请重试,Try again /
#define EWOULDBLOCK EAGAIN / 操作被阻塞,Operation would block /
#define EINPROGRESS 36 / 操作正在处理中,Operation now in progress /
#define EALREADY 37 / 操作已就绪,Operation already in progress /
#define ENOTSOCK 38 / Socket operation on non-socket /
#define EDESTADDRREQ 39 / 需要目的地址,Destination address required /
#define EMSGSIZE 40 / 消息太长,Message too long /
#define EPROTOTYPE 41 / 协议类型错误,Protocol wrong type for socket /
#define ENOPROTOOPT 42 / 协议不可用,Protocol not available /
#define EPROTONOSUPPORT 43 / 协议不支持,Protocol not supported /
#define ESOCKTNOSUPPORT 44 / Socket类型不支持,Socket type not supported /
#define EOPNOTSUPP 45 / 在该传输端点上操作不支持,Operation not supported on transport endpoint /
#define EPFNOSUPPORT 46 / 协议族不支持,Protocol family not supported /
#define EAFNOSUPPORT 47 / 地址族不支持,Address family not supported by protocol /
#define EADDRINUSE 48 / 地址已在使用,Address already in use /
#define EADDRNOTAVAIL 49 / 所请求的地址无法分配,Cannot assign requested address /
#define ENETDOWN 50 / 网络已断开,Network is down /
#define ENETUNREACH 51 / 网络无法访问,Network is unreachable /
#define ENETRESET 52 / 因为复位导致网络连接中断,Network dropped connection because of reset /
#define ECONNABORTED 53 / 连接中止,Software caused connection abort /
#define ECONNRESET 54 / 连接复位,Connection reset by peer */
#define ENOBUFS 55 /* 没有可用的缓存,No buffer space available /
#define EISCONN 56 / 传输端点已连接,Transport endpoint is already connected /
#define ENOTCONN 57 / 传输端点未连接,Transport endpoint is not connected /
#define ESHUTDOWN 58 / 传输端点关闭后无法发送,Cannot send after transport endpoint shutdown /
#define ETOOMANYREFS 59 / 引用太多无法拼接,Too many references: cannot splice /
#define ETIMEDOUT 60 / 连接超时,Connection timed out /
#define ECONNREFUSED 61 / 连接被拒绝,Connection refused /
#define ELOOP 62 / 符号连接冲突太多 /
#define ENAMETOOLONG 63 / 文件名太长,File name too long /
#define EHOSTDOWN 64 / 主机已关闭,Host is down /
#define EHOSTUNREACH 65 / 主机无路由,No route to host /
#define ENOTEMPTY 66 / 文件夹非空,Directory not empty /
#define EUSERS 68 / 用户太多,Too many users */
#define EDQUOT 69 /* 超出界限,Quota exceeded /
#define ESTALE 70 / 旧的文件句柄,Stale file handle /
#define EREMOTE 71 / 目标已移除,Object is remote /
#define ENOLCK 77 / 没有可用的锁,No record locks available /
#define ENOSYS 78 / 函数未实现 /
#define ENOMSG 80 / 没有所需类型的消息,No message of desired type /
#define EIDRM 81 / 标识符已删除,Identifier removed /
#define ENOSR 82 / 没有流资源,Out of streams resources /
#define ETIME 83 / 定时器超时,Timer expired /
#define EBADMSG 84 / 不是数据消息 /
#define EPROTO 85 / 协议错误,Protocol error */
#define ENODATA 86 /* 没有可用的数据,No data available /
#define ENOSTR 87 / 不是流设备,Device not a stream /
#define ENOPKG 92 / 包未安装,Package not installed /
#define EILSEQ 116 / 字节序列非法Illegal byte sequence /
#define ECHRNG 88 / 通道号超出范围,Channel number out of range /
#define EL2NSYNC 89 / 级别2未同步,Level 2 not synchronized /
#define EL3HLT 90 / 级别3中止,Level 3 halted /
#define EL3RST 91 / 级别3复位,Level 3 reset /
#define ELNRNG 93 / 链接号超出范围,Link number out of range /
#define EUNATCH 94 / 协议驱动未附加,Protocol driver not attached /
#define ENOCSI 95 / CSI结构不可用,No CSI structure available /
#define EL2HLT 96 / 级别2中止,Level 2 halted /
#define EBADE 97 / 无效的交换 /
#define EBADR 98 / 无效的请求描述符 /
#define EXFULL 99 / 交换已满,Exchange full /
#define ENOANO 100 / 没有正极,No anode /
#define EBADRQC 101 / 请求码无效,Invalid request code /
#define EBADSLT 102 / Invalid slot /
#define EDEADLK 11 / 将发生资源死锁,Resource deadlock would occur /
#define EDEADLOCK EDEADLK / 发生死锁 /
#define EBFONT 104 / 字库文件格式错误,Bad font file format /
#define ENONET 105 / 设备未联网,Machine is not on the network /
#define ENOLINK 106 / 链路已断,Link has been severed /
#define EADV 107 / 广播错误,Advertise error /
#define ESRMNT 108 / 挂载错误,Srmount error /
#define ECOMM 109 / 发送时通信错误,Communication error on send /
#define EMULTIHOP 110 / 尝试多跳,Multihop attempted /
#define EDOTDOT 111 / RFS specific error */
#define EOVERFLOW 112 /* 参数溢出,对于已定义的数据类型来说值太大 /
#define ENOTUNIQ 113 / 名称在网络上不唯一,Name not unique on network /
#define EBADFD 114 / 文件描述符处于非法状态,File descriptor in bad state /
#define EREMCHG 115 / 远端地址已改变,Remote address changed /
#define EUCLEAN 117 / 结构需要清理,Structure needs cleaning /
#define ENOTNAM 118 / 不是由XENIX命名的类型文件,Not a XENIX named type file */
#define ENAVAIL 119 /* 没有可用的XENIX信号量,No XENIX semaphores available /
#define EISNAM 120 / 是一个已命名的文件,Is a named type file /
#define EREMOTEIO 121 / 远端读写错误,Remote I/O error */
#define ELIBACC 122 /* 无法访问所需的共享库,Can not access a needed shared library /
#define ELIBBAD 123 / 访问的共享库已损坏,Accessing a corrupted shared library /
#define ELIBSCN 124 / a.out中的.lib部分已损坏,.lib section in a.out corrupted /
#define ELIBMAX 125 / 试图链接的共享库太多,Attempting to link in too many shared libraries /
#define ELIBEXEC 126 / 不能直接运行共享库,Cannot exec a shared library directly */
#define ERESTART 127 /* 应重新启动已中断的系统调用,Interrupted system call should be restarted /
#define ESTRPIPE 128 / 流管道错误,Streams pipe error /
#define ENOMEDIUM 129 / 找不到介质,No medium found /
#define EMEDIUMTYPE 130 / 错误的介质类型,Wrong medium type */
#define ECANCELED 131 /* 操作已取消,Operation Cancelled /
#define ENOKEY 132 / 所需键值不可用,Required key not available /
#define EKEYEXPIRED 133 / 密钥已过期,Key has expired /
#define EKEYREVOKED 134 / 密钥已吊销,Key has been revoked /
#define EKEYREJECTED 135 / 密钥被服务拒绝,Key was rejected by service /
#define EOWNERDEAD 136 / 拥有者已注销,Owner died /
#define ENOTRECOVERABLE 137 / 状态不可恢复,State not recoverable /
#define ERFKILL 138 / Operation not possible due to RF-kill /
#define EHWPOISON 139 / 内存页硬件错误,Memory page has hardware error /
#define ERESTARTSYS 512 / 系统重启 /
#define ERESTARTNOINTR 513 / 无中断的系统重启 /
#define ERESTARTNOHAND 514 / 无处理句柄的重启,restart if no handler… /
#define ENOIOCTLCMD 515 / 命令不存在,No ioctl command /
#define ERESTART_RESTARTBLOCK 516 / 系统调用的重启,restart by calling sys_restart_syscall /
#define EPROBE_DEFER 517 / 驱动需要重新探测,Driver requests probe retry /
#define EOPENSTALE 518 / 打开时发现了一个旧入口,open found a stale dentry */
#define ENOPARAM 519 /* 参数不支持,Parameter not supported /
#define EBADHANDLE 521 / 非法的NFS文件句柄,Illegal NFS file handle /
#define ENOTSYNC 522 / 更新同步不匹配,Update synchronization mismatch /
#define EBADCOOKIE 523 / Cookie太陈旧,Cookie is stale */
#define ENOTSUPP 524 /* 操作不支持,Operation is not supported /
#define ETOOSMALL 525 / 缓存或请求太小,Buffer or request is too small /
#define ESERVERFAULT 526 / 无法翻译,An untranslatable error occurred /
#define EBADTYPE 527 / 服务器不支持的类型,Type not supported by server /
#define EJUKEBOX 528 / 请求超时,Request initiated, but will not complete before timeout /
#define EIOCBQUEUED 529 / io回调已推入队列,将得到完成标志,iocb queued, will get completion event /
#define ERECALLCONFLICT 530 / 回调状态冲突,conflict with recalled state /
#define ENOGRACE 531 / 拒绝取回NFS文件锁,NFS file lock reclaim refused */
#endif /* UTIL_ERRNO_H */文章来源:https://www.toymoban.com/news/detail-471572.html
/*********************************** 文件尾 ***********************************/文章来源地址https://www.toymoban.com/news/detail-471572.html
到了这里,关于04 Linux errno.h错误码中文注释的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!