errno 错误对照表

#include <stdio.h>
#include <string.h>
#include <errno.h>

int main()
{
    int i = 0;

    for (i = 0; i <= 150; i++) {
        errno = i;
        printf("errno = %03d:%s\n", errno, strerror(errno));
    }

    return 0;
}

errno = 000:Success
errno = 001:Operation not permitted
errno = 002:No such file or directory
errno = 003:No such process
errno = 004:Interrupted system call
errno = 005:Input/output error
errno = 006:No such device or address
errno = 007:Argument list too long
errno = 008:Exec format error
errno = 009:Bad file descriptor
errno = 010:No child processes
errno = 011:Resource temporarily unavailable
errno = 012:Cannot allocate memory
errno = 013:Permission denied
errno = 014:Bad address
errno = 015:Block device required
errno = 016:Device or resource busy
errno = 017:File exists
errno = 018:Invalid cross-device link
errno = 019:No such device
errno = 020:Not a directory
errno = 021:Is a directory
errno = 022:Invalid argument
errno = 023:Too many open files in system
errno = 024:Too many open files
errno = 025:Inappropriate ioctl for device
errno = 026:Text file busy
errno = 027:File too large
errno = 028:No space left on device
errno = 029:Illegal seek
errno = 030:Read-only file system
errno = 031:Too many links
errno = 032:Broken pipe
errno = 033:Numerical argument out of domain
errno = 034:Numerical result out of range
errno = 035:Resource deadlock avoided
errno = 036:File name too long
errno = 037:No locks available
errno = 038:Function not implemented
errno = 039:Directory not empty
errno = 040:Too many levels of symbolic links
errno = 041:Unknown error 41
errno = 042:No message of desired type
errno = 043:Identifier removed
errno = 044:Channel number out of range
errno = 045:Level 2 not synchronized
errno = 046:Level 3 halted
errno = 047:Level 3 reset
errno = 048:Link number out of range
errno = 049:Protocol driver not attached
errno = 050:No CSI structure available
errno = 051:Level 2 halted
errno = 052:Invalid exchange
errno = 053:Invalid request descriptor
errno = 054:Exchange full
errno = 055:No anode
errno = 056:Invalid request code
errno = 057:Invalid slot
errno = 058:Unknown error 58
errno = 059:Bad font file format
errno = 060:Device not a stream
errno = 061:No data available
errno = 062:Timer expired
errno = 063:Out of streams resources
errno = 064:Machine is not on the network
errno = 065:Package not installed
errno = 066:Object is remote
errno = 067:Link has been severed
errno = 068:Advertise error
errno = 069:Srmount error
errno = 070:Communication error on send
errno = 071:Protocol error
errno = 072:Multihop attempted
errno = 073:RFS specific error
errno = 074:Bad message
errno = 075:Value too large for defined data type
errno = 076:Name not unique on network
errno = 077:File descriptor in bad state
errno = 078:Remote address changed
errno = 079:Can not access a needed shared library
errno = 080:Accessing a corrupted shared library
errno = 081:.lib section in a.out corrupted
errno = 082:Attempting to link in too many shared libraries
errno = 083:Cannot exec a shared library directly
errno = 084:Invalid or incomplete multibyte or wide character
errno = 085:Interrupted system call should be restarted
errno = 086:Streams pipe error
errno = 087:Too many users
errno = 088:Socket operation on non-socket
errno = 089:Destination address required
errno = 090:Message too long
errno = 091:Protocol wrong type for socket
errno = 092:Protocol not available
errno = 093:Protocol not supported
errno = 094:Socket type not supported
errno = 095:Operation not supported
errno = 096:Protocol family not supported
errno = 097:Address family not supported by protocol
errno = 098:Address already in use
errno = 099:Cannot assign requested address
errno = 100:Network is down
errno = 101:Network is unreachable
errno = 102:Network dropped connection on reset
errno = 103:Software caused connection abort
errno = 104:Connection reset by peer
errno = 105:No buffer space available
errno = 106:Transport endpoint is already connected
errno = 107:Transport endpoint is not connected
errno = 108:Cannot send after transport endpoint shutdown
errno = 109:Too many references: cannot splice
errno = 110:Connection timed out
errno = 111:Connection refused
errno = 112:Host is down
errno = 113:No route to host
errno = 114:Operation already in progress
errno = 115:Operation now in progress
errno = 116:Stale file handle
errno = 117:Structure needs cleaning
errno = 118:Not a XENIX named type file
errno = 119:No XENIX semaphores available
errno = 120:Is a named type file
errno = 121:Remote I/O error
errno = 122:Disk quota exceeded
errno = 123:No medium found
errno = 124:Wrong medium type
errno = 125:Operation canceled
errno = 126:Required key not available
errno = 127:Key has expired
errno = 128:Key has been revoked
errno = 129:Key was rejected by service
errno = 130:Owner died
errno = 131:State not recoverable
errno = 132:Operation not possible due to RF-kill
errno = 133:Memory page has hardware error
errno = 134:Unknown error 134
errno = 135:Unknown error 135
errno = 136:Unknown error 136
errno = 137:Unknown error 137
errno = 138:Unknown error 138
errno = 139:Unknown error 139
errno = 140:Unknown error 140
errno = 141:Unknown error 141
errno = 142:Unknown error 142
errno = 143:Unknown error 143
errno = 144:Unknown error 144
errno = 145:Unknown error 145
errno = 146:Unknown error 146
errno = 147:Unknown error 147
errno = 148:Unknown error 148
errno = 149:Unknown error 149
errno = 150:Unknown error 150

  • 10
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值