欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

errno错误对照表

程序员文章站 2022-03-15 22:22:54
...

错误对照表:

错误值 内容 内容
errno 0 : Success 成功
errno 1 : Operation not permitted 不允许操作
errno 2 : No such file or directory 没有这样的文件或目录
errno 3 : No such process 没有这样的过程
errno 4 : Interrupted system call 中断的系统调用
errno 5 : Input/output error 输入/输出错误
errno 6 : No such device or address 没有这样的设备或地址
errno 7 : Argument list too long 参数列表太长
errno 8 : Exec format error Exec格式错误
errno 9 : Bad file descriptor 错误的文件描述符
errno 10 : No child processes 无子进程
errno 11 : Resource temporarily unavailable 资源暂时不可用
errno 12 : Cannot allocate memory 无法分配内存
errno 13 : Permission denied 权限被拒绝
errno 14 : Bad address 地址错误
errno 15 : Block device required 需要阻止设备
errno 16 : Device or resource busy 设备或资源繁忙
errno 17 : File exists 文件存在
errno 18 : Invalid cross-device link 无效的跨设备链接
errno 19 : No such device 没有这样的装置
errno 20 : Not a directory 不是一个目录
errno 21 : Is a directory 是一个目录
errno 22 : Invalid argument 无效参数
errno 23 : Too many open files in system 系统中打开的文件太多
errno 24 : Too many open files 打开的文件太多
errno 25 : Inappropriate ioctl for device 设备的ioctl不正确
errno 26 : Text file busy 文本文件繁忙
errno 27 : File too large 文件太大
errno 28 : No space left on device 设备上没有剩余空间
errno 29 : Illegal seek 非法搜索
errno 30 : Read-only file system 只读文件系统
errno 31 : Too many links 链接太多
errno 32 : Broken pipe 破裂的管子
errno 33 : Numerical argument out of domain 数值参数超出域
errno 34 : Numerical result out of range 数值结果超出范围
errno 35 : Resource deadlock avoided 避免了资源死锁
errno 36 : File name too long 文件名太长
errno 37 : No locks available 没有可用的锁
errno 38 : Function not implemented 功能未实现
errno 39 : Directory not empty 目录不为空
errno 40 : Too many levels of symbolic links 符号链接级别太多
errno 41 : Unknown error 41 未知错误41
errno 42 : No message of desired type 没有所需类型的消息
errno 43 : Identifier removed 标识符已删除
errno 44 : Channel number out of range 频道号超出范围
errno 45 : Level 2 not synchronized 2级未同步
errno 46 : Level 3 halted 3级停止
errno 47 : Level 3 reset 3级重置
errno 48 : Link number out of range 链路号超出范围
errno 49 : Protocol driver not attached 协议驱动程序未连接
errno 50 : No CSI structure available 没有可用的CSI结构
errno 51 : Level 2 halted 2级停止
errno 52 : Invalid exchange 无效的交换
errno 53 : Invalid request descriptor 无效的请求描述符
errno 54 : Exchange full 交换已满
errno 55 : No anode 无阳极
errno 56 : Invalid request code 无效的请求代码
errno 57 : Invalid slot 插槽无效
errno 58 : Unknown error 58 未知错误58
errno 59 : Bad font file format 字体文件格式错误
errno 60 : Device not a stream 设备不是流
errno 61 : No data available 无可用数据
errno 62 : Timer expired 计时器已过期
errno 63 : Out of streams resources 流外资源
errno 64 : Machine is not on the network 计算机不在网络上
errno 65 : Package not installed 包未安装
errno66 : Object is remote 对象是远程的
errno67 : Link has been severed 链接已断开
errno68 : Advertise error 播发错误
errno69 : Srmount error Srmount错误
errno70 : Communication error on send 发送时发生通信错误
errno71 : Protocol error 协议错误
errno72 : Multihop attempted 尝试多跳
errno73 : RFS specific error RFS特定错误
errno74 : Bad message 错误消息
errno75 : Value too large for defined datatype 对于定义的数据类型,值太大
errno76 : Name not unique on network 名称在网络上不唯一
errno77 : File descriptor in bad state 文件描述符处于错误状态
errno78 : Remote address changed 远程地址已更改
errno79 : Can not access a needed sharedlibrary 无法访问所需的共享库
errno80 : Accessing a corrupted sharedlibrary 访问损坏的共享库
errno81 : .lib section in a.out corrupted out中的lib节已损坏
errno82 : Attempting to link in too manyshared libraries 试图链接到太多共享库中
errno83 : Cannot exec a shared librarydirectly 无法直接执行共享库
errno84 : Invalid or incomplete multibyte orwide character 多字节或宽字符无效或不完整
errno85 : Interrupted system call should berestarted 中断的系统调用应重新启动
errno86 : Streams pipe error 流管道错误
errno87 : Too many users 用户太多
errno88 : Socket operation on non-socket 非套接字上的套接字操作
errno89 : Destinationaddress required 需要Destinationaddress
errno90 : Message too long 消息太长
errno91 : Protocol wrong type for socket 套接字的协议类型错误
errno92 : Protocol not available 协议不可用
errno93 : Protocol not supported 不支持协议
errno94 : Socket type not supported 不支持套接字类型
errno95 : Operation not supported 不支持操作
errno96 : Protocol family not supported 不支持协议系列
errno97 : Address family not supported byprotocol 协议不支持地址系列
errno98 : Address already in use 地址已在使用中
errno99 : Cannot assign requested address 无法分配请求的地址
errno100 : Network is down 网络已关闭
errno101 : Network is unreachable 无法访问网络
errno102 : Network dropped connection onreset 重置时网络断开连接
errno103 : Software caused connection abort 软件导致连接中止
errno104 : Connection reset by peer 对等方重置连接
errno105 : No buffer space available 没有可用的缓冲区空间
errno106 : Transport endpoint is alreadyconnected 传输终结点已连接
errno107 : Transport endpoint is notconnected 传输终结点未连接
errno108 : Cannot send after transportendpoint shutdown transportendpoint关闭后无法发送
errno109 : Too many references: cannot splice 引用太多:无法拼接
errno110 : Connection timed out 连接超时
errno111 : Connection refused 连接被拒绝
errno112 : Host is down 主机已关闭
errno113 : No route to host 没有到主机的路由
errno114 : Operation already in progress 操作已在进行中
errno115 : Operation now in progress 操作正在进行
errno116 : Stale NFS file handle NFS文件句柄已过时
errno117 : Structure needs cleaning 结构需要清理
errno118 : Not a XENIX named type file 不是XENIX命名的类型文件
errno119 : No XENIX semaphores available 没有可用的XENIX信号量
errno120 : Is a named type file 是命名类型文件
errno121 : Remote I/O error 远程I/O错误
errno122 : Disk quota exceeded 超出磁盘配额
errno123 : No medium found 找不到媒体
errno124 : Wrong medium type 错误的媒体类型
errno125 : Operation canceled 操作已取消
errno126 : Required key not available 所需**不可用
errno127 : Key has expired **已过期
errno128 : Key has been revoked **已被吊销
errno129 : Key was rejected by service **被服务拒绝
errno130 : Owner died 主人死了
errno131 : State not recoverable 状态不可恢复
errno132 : Operation not possible due toRF-kill 由于toRF kill,无法进行操作
errno133 : Unknown error 133 未知错误133
errno134 : Unknown error 134 未知错误134
errno135 : Unknown error 135 未知错误135
errno136 : Unknown error 136 未知错误136
errno137 : Unknown error 137 未知错误137
errno138 : Unknown error 138 未知错误138
errno139 : Unknown error 139 未知错误139

由上可见Linux对错误宏的定义。


头文件 /usr/include/asm-generic/errno-base.h 的源码:

#ifndef _ASM_GENERIC_ERRNO_BASE_H
#define _ASM_GENERIC_ERRNO_BASE_H

#define EPERM   1 /* Operation not permitted */
#define ENOENT2/* No such file or directory */
#define ESRCH   3 /* No such process */
#define EINTR   4 /* Interrupted system call */
#define EIO   5 /* I/O error */
#define ENXIO   6 /* No such device or address */
#define E2BIG   7 /* Argument list too long */
#define ENOEXEC8/* Exec format error */
#define EBADF   9 /* Bad file number */
#define ECHILD10/* No child processes */
#define EAGAIN11/* Try again */
#define ENOMEM12/* Out of memory */
#define EACCES13/* Permission denied */
#define EFAULT14/* Bad address */
#define ENOTBLK15/* Block device required */
#define EBUSY   16 /* Device or resource busy */
#define EEXIST17/* File exists */
#define EXDEV   18 /* Cross-device link */
#define ENODEV19/* No such device */
#define ENOTDIR20/* Not a directory */
#define EISDIR21/* Is a directory */
#define EINVAL22/* Invalid argument */
#define ENFILE23/* File table overflow */
#define EMFILE24/* Too many open files */
#define ENOTTY25/* Not a typewriter */
#define ETXTBSY26/* Text file busy */
#define EFBIG   27 /* File too large */
#define ENOSPC28/* No space left on device */
#define ESPIPE29/* Illegal seek */
#define EROFS   30 /* Read-only file system */
#define EMLINK31/* Too many links */
#define EPIPE   32 /* Broken pipe */
#define EDOM   33 /* Math argument out of domain of func */
#define ERANGE34/* Math result not representable */

#endif


头文件/usr/include/asm-generic/erno.h源码:

#ifndef _ASM_GENERIC_ERRNO_H
#define _ASM_GENERIC_ERRNO_H

#include <asm-generic/errno-base.h>

#define EDEADLK35/* Resource deadlock would occur */
#define ENAMETOOLONG36/* File name too long */
#define ENOLCK37/* No record locks available */
#define ENOSYS38/* Function not implemented */
#define ENOTEMPTY39/* Directory not empty */
#define ELOOP   40 /* Too many symbolic links encountered */
#define EWOULDBLOCKEAGAIN/* Operation would block */
#define ENOMSG42/* No message of desired type */
#define EIDRM   43 /* Identifier removed */
#define ECHRNG44/* Channel number out of range */
#define EL2NSYNC45/* Level 2 not synchronized */
#define EL3HLT46/* Level 3 halted */
#define EL3RST47/* Level 3 reset */
#define ELNRNG48/* Link number out of range */
#define EUNATCH49/* Protocol driver not attached */
#define ENOCSI50/* No CSI structure available */
#define EL2HLT51/* Level 2 halted */
#define EBADE   52 /* Invalid exchange */
#define EBADR   53 /* Invalid request descriptor */
#define EXFULL54/* Exchange full */
#define ENOANO55/* No anode */
#define EBADRQC56/* Invalid request code */
#define EBADSLT57/* Invalid slot */

#define EDEADLOCKEDEADLK

#define EBFONT59/* Bad font file format */
#define ENOSTR60/* Device not a stream */
#define ENODATA61/* No data available */
#define ETIME   62 /* Timer expired */
#define ENOSR   63 /* Out of streams resources */
#define ENONET64/* Machine is not on the network */
#define ENOPKG65/* Package not installed */
#define EREMOTE66/* Object is remote */
#define ENOLINK67/* Link has been severed */
#define EADV   68 /* Advertise error */
#define ESRMNT69/* Srmount error */
#define ECOMM   70 /* Communication error on send */
#define EPROTO71/* Protocol error */
#define EMULTIHOP72/* Multihop attempted */
#define EDOTDOT73/* RFS specific error */
#define EBADMSG74/* Not a data message */
#define EOVERFLOW75/* Value too large for defined data type */
#define ENOTUNIQ76/* Name not unique on network */
#define EBADFD77/* File descriptor in bad state */
#define EREMCHG78/* Remote address changed */
#define ELIBACC79/* Can not access a needed shared library */
#define ELIBBAD80/* Accessing a corrupted shared library */
#define ELIBSCN81/* .lib section in a.out corrupted */
#define ELIBMAX82/* Attempting to link in too many shared libraries */
#define ELIBEXEC83/* Cannot exec a shared library directly */
#define EILSEQ84/* Illegal byte sequence */
#define ERESTART85/* Interrupted system call should be restarted */
#define ESTRPIPE86/* Streams pipe error */
#define EUSERS87/* Too many users */
#define ENOTSOCK88/* Socket operation on non-socket */
#define EDESTADDRREQ89/* Destination address required */
#define EMSGSIZE90/* Message too long */
#define EPROTOTYPE91/* Protocol wrong type for socket */
#define ENOPROTOOPT92/* Protocol not available */
#define EPROTONOSUPPORT93/* Protocol not supported */
#define ESOCKTNOSUPPORT94/* Socket type not supported */
#define EOPNOTSUPP95/* Operation not supported on transport endpoint */
#define EPFNOSUPPORT96/* Protocol family not supported */
#define EAFNOSUPPORT97/* Address family not supported by protocol */
#define EADDRINUSE98/* Address already in use */
#define EADDRNOTAVAIL99/* Cannot assign requested address */
#define ENETDOWN100/* Network is down */
#define ENETUNREACH101/* Network is unreachable */
#define ENETRESET102/* Network dropped connection because of reset */
#define ECONNABORTED103/* Software caused connection abort */
#define ECONNRESET104/* Connection reset by peer */
#define ENOBUFS105/* No buffer space available */
#define EISCONN106/* Transport endpoint is already connected */
#define ENOTCONN107/* Transport endpoint is not connected */
#define ESHUTDOWN108/* Cannot send after transport endpoint shutdown */
#define ETOOMANYREFS109/* Too many references: cannot splice */
#define ETIMEDOUT110/* Connection timed out */
#define ECONNREFUSED111/* Connection refused */
#define EHOSTDOWN112/* Host is down */
#define EHOSTUNREACH113/* No route to host */
#define EALREADY114/* Operation already in progress */
#define EINPROGRESS115/* Operation now in progress */
#define ESTALE116/* Stale NFS file handle */
#define EUCLEAN117/* Structure needs cleaning */
#define ENOTNAM118/* Not a XENIX named type file */
#define ENAVAIL119/* No XENIX semaphores available */
#define EISNAM120/* Is a named type file */
#define EREMOTEIO121/* Remote I/O error */
#define EDQUOT122/* Quota exceeded */

#define ENOMEDIUM123/* No medium found */
#define EMEDIUMTYPE124/* Wrong medium type */
#define ECANCELED125/* Operation Canceled */
#define ENOKEY126/* Required key not available */
#define EKEYEXPIRED127/* Key has expired */
#define EKEYREVOKED128/* Key has been revoked */
#define EKEYREJECTED129/* Key was rejected by service */

/* for robust mutexes */
#define EOWNERDEAD130/* Owner died */
#define ENOTRECOVERABLE131/* State not recoverable */

#define ERFKILL 132/* Operation not possible due to RF-kill */

#endif

上一篇: 2020-08-11

下一篇: python--每日一练-02