linux错误码大全.docx
- 文档编号:12633013
- 上传时间:2023-04-21
- 格式:DOCX
- 页数:9
- 大小:17.59KB
linux错误码大全.docx
《linux错误码大全.docx》由会员分享,可在线阅读,更多相关《linux错误码大全.docx(9页珍藏版)》请在冰豆网上搜索。
linux错误码大全
linux错误码大全
查看错误代码errno是调试程序的一个重要方法。
当linucCapi函数发生异常时,一般会将errno变量(需includeerrno.h)赋一个整数值,不同的值表示不同的含义,可以通过查看该值推测出错的原因。
在实际编程中用这一招解决了不少原本看来莫名其妙的问题。
比较麻烦的是每次都要去linux源代码里面查找错误代码的含义,现在把它贴出来,以后需要查时就来这里看了。
1-34号错误号是在内核源码的include/asm-generic/errno-base.h定义
35-132则是在include/asm-generic/errno.h中定义
剩下还有一些更大的错误号是留给内核级别的,如系统调用等,用户程序一般是看不见的这些号的,Ubuntu9.10中/usr/src/linux-headers-2.6.31-21-generic/include/linux/errno.h
#ifndef_ASM_GENERIC_ERRNO_BASE_H
#define_ASM_GENERIC_ERRNO_BASE_H
#define EPERM 1 /*Operationnotpermitted*/
#define ENOENT 2 /*Nosuchfileordirectory*/
#define ESRCH 3 /*Nosuchprocess*/
#define EINTR 4 /*Interruptedsystemcall*/
#define EIO 5 /*I/Oerror*/
#define ENXIO 6 /*Nosuchdeviceoraddress*/
#define E2BIG 7 /*Argumentlisttoolong*/
#define ENOEXEC 8 /*Execformaterror*/
#define EBADF 9 /*Badfilenumber*/
#define ECHILD 10 /*Nochildprocesses*/
#define EAGAIN 11 /*Tryagain*/
#define ENOMEM 12 /*Outofmemory*/
#define EACCES 13 /*Permissiondenied*/
#define EFAULT 14 /*Badaddress*/
#define ENOTBLK 15 /*Blockdevicerequired*/
#define EBUSY 16 /*Deviceorresourcebusy*/
#define EEXIST 17 /*Fileexists*/
#define EXDEV 18 /*Cross-devicelink*/
#define ENODEV 19 /*Nosuchdevice*/
#define ENOTDIR 20 /*Notadirectory*/
#define EISDIR 21 /*Isadirectory*/
#define EINVAL 22 /*Invalidargument*/
#define ENFILE 23 /*Filetableoverflow*/
#define EMFILE 24 /*Toomanyopenfiles*/
#define ENOTTY 25 /*Notatypewriter*/
#define ETXTBSY 26 /*Textfilebusy*/
#define EFBIG 27 /*Filetoolarge*/
#define ENOSPC 28 /*Nospaceleftondevice*/
#define ESPIPE 29 /*Illegalseek*/
#define EROFS 30 /*Read-onlyfilesystem*/
#define EMLINK 31 /*Toomanylinks*/
#define EPIPE 32 /*Brokenpipe*/
#define EDOM 33 /*Mathargumentoutofdomainoffunc*/
#define ERANGE 34 /*Mathresultnotrepresentable*/
#endif
#include
#define EDEADLK 35 /*Resourcedeadlockwouldoccur*/
#define ENAMETOOLONG 36 /*Filenametoolong*/
#define ENOLCK 37 /*Norecordlocksavailable*/
#define ENOSYS 38 /*Functionnotimplemented*/
#define ENOTEMPTY 39 /*Directorynotempty*/
#define ELOOP 40 /*Toomanysymboliclinksencountered*/
#define EWOULDBLOCK EAGAIN /*Operationwouldblock*/
#define ENOMSG 42 /*Nomessageofdesiredtype*/
#define EIDRM 43 /*Identifierremoved*/
#define ECHRNG 44 /*Channelnumberoutofrange*/
#define EL2NSYNC 45 /*Level2notsynchronized*/
#define EL3HLT 46 /*Level3halted*/
#define EL3RST 47 /*Level3reset*/
#define ELNRNG 48 /*Linknumberoutofrange*/
#define EUNATCH 49 /*Protocoldrivernotattached*/
#define ENOCSI 50 /*NoCSIstructureavailable*/
#define EL2HLT 51 /*Level2halted*/
#define EBADE 52 /*Invalidexchange*/
#define EBADR 53 /*Invalidrequestdescriptor*/
#define EXFULL 54 /*Exchangefull*/
#define ENOANO 55 /*Noanode*/
#define EBADRQC 56 /*Invalidrequestcode*/
#define EBADSLT 57 /*Invalidslot*/
#define EDEADLOCK EDEADLK
#define EBFONT 59 /*Badfontfileformat*/
#define ENOSTR 60 /*Devicenotastream*/
#define ENODATA 61 /*Nodataavailable*/
#define ETIME 62 /*Timerexpired*/
#define ENOSR 63 /*Outofstreamsresources*/
#define ENONET 64 /*Machineisnotonthenetwork*/
#define ENOPKG 65 /*Packagenotinstalled*/
#define EREMOTE 66 /*Objectisremote*/
#define ENOLINK 67 /*Linkhasbeensevered*/
#define EADV 68 /*Advertiseerror*/
#define ESRMNT 69 /*Srmounterror*/
#define ECOMM 70 /*Communicationerroronsend*/
#define EPROTO 71 /*Protocolerror*/
#define EMULTIHOP 72 /*Multihopattempted*/
#define EDOTDOT 73 /*RFSspecificerror*/
#define EBADMSG 74 /*Notadatamessage*/
#define EOVERFLOW 75 /*Valuetoolargefordefineddatatype*/
#define ENOTUNIQ 76 /*Namenotuniqueonnetwork*/
#define EBADFD 77 /*Filedescriptorinbadstate*/
#define EREMCHG 78 /*Remoteaddresschanged*/
#define ELIBACC 79 /*Cannotaccessaneededsharedlibrary*/
#define ELIBBAD 80 /*Accessingacorruptedsharedlibrary*/
#define ELIBSCN 81 /*.libsectionina.outcorrupted*/
#define ELIBMAX 82 /*Attemptingtolinkintoomanysharedlibraries*/
#define ELIBEXEC 83 /*Cannotexecasharedlibrarydirectly*/
#define EILSEQ 84 /*Illegalbytesequence*/
#define ERESTART 85 /*Interruptedsystemcallshouldberestarted*/
#define ESTRPIPE 86 /*Streamspipeerror*/
#define EUSERS 87 /*Toomanyusers*/
#define ENOTSOCK 88 /*Socketoperationonnon-socket*/
#define EDESTADDRREQ 89 /*Destinationaddressrequired*/
#define EMSGSIZE 90 /*Messagetoolong*/
#define EPROTOTYPE 91 /*Protocolwrongtypeforsocket*/
#define ENOPROTOOPT 92 /*Protocolnotavailable*/
#define EPROTONOSUPPORT 93 /*Protocolnotsupported*/
#define ESOCKTNOSUPPORT 94 /*Sockettypenotsupported*/
#define EOPNOTSUPP 95 /*Operationnotsupportedontransportendpoint*/
#define EPFNOSUPPORT 96 /*Protocolfamilynotsupported*/
#define EAFNOSUPPORT 97 /*Addressfamilynotsupportedbyprotocol*/
#define EADDRINUSE 98 /*Addressalreadyinuse*/
#define EADDRNOTAVAIL 99 /*Cannotassignrequestedaddress*/
#define ENETDOWN 100 /*Networkisdown*/
#define ENETUNREACH 101 /*Networkisunreachable*/
#define ENETRESET 102 /*Networkdroppedconnectionbecauseofreset*/
#define ECONNABORTED 103 /*Softwarecausedconnectionabort*/
#define ECONNRESET 104 /*Connectionresetbypeer*/
#define ENOBUFS 105 /*Nobufferspaceavailable*/
#define EISCONN 106 /*Transportendpointisalreadyconnected*/
#define ENOTCONN 107 /*Transportendpointisnotconnected*/
#define ESHUTDOWN 108 /*Cannotsendaftertransportendpointshutdown*/
#define ETOOMANYREFS 109 /*Toomanyreferences:
cannotsplice*/
#define ETIMEDOUT 110 /*Connectiontimedout*/
#define ECONNREFUSED 111 /*Connectionrefused*/
#define EHOSTDOWN 112 /*Hostisdown*/
#define EHOSTUNREACH 113 /*Noroutetohost*/
#define EALREADY 114 /*Operationalreadyinprogress*/
#define EINPROGRESS 115 /*Operationnowinprogress*/
#define ESTALE 116 /*StaleNFSfilehandle*/
#define EUCLEAN 117 /*Structureneedscleaning*/
#define ENOTNAM 118 /*NotaXENIXnamedtypefile*/
#define ENAVAIL 119 /*NoXENIXsemaphoresavailable*/
#define EISNAM 120 /*Isanamedtypefile*/
#define EREMOTEIO 121 /*RemoteI/Oerror*/
#define EDQUOT 122 /*Quotaexceeded*/
#define ENOMEDIUM 123 /*Nomediumfound*/
#define EMEDIUMTYPE 124 /*Wrongmediumtype*/
#define ECANCELED 125 /*OperationCanceled*/
#define ENOKEY 126 /*Requiredkeynotavailable*/
#define EKEYEXPIRED 127 /*Keyhasexpired*/
#define EKEYREVOKED 128 /*Keyhasbeenrevoked*/
#define EKEYREJECTED 129 /*Keywasrejectedbyservice*/
/*forrobustmutexes*/
#define EOWNERDEAD 130 /*Ownerdied*/
#define ENOTRECOVERABLE 131 /*Statenotrecoverable*/
#defineERFKILL 132 /*OperationnotpossibleduetoRF-kill*/
#ifdef__KERNEL__
/*
*Theseshouldneverbeseenbyuserprograms.ToreturnoneofERESTART*
*codes,signal_pending()MUSTbeset.Notethatptracecanobservethese
*atsyscallexittracing,buttheywillneverbeleftforthedebuggeduser
*processtosee.
*/
#defineERESTARTSYS 512
#defineERESTARTNOINTR 513
#defineERESTARTNOHAND 514 /*restartifnohandler..*/
#defineENOIOCTLCMD 515 /*Noioctlcommand*/
#defineERESTART_RESTARTBLOCK516/*restartbycallingsys_restart_syscall*/
/*DefinedfortheNFSv3protocol*/
#defineEBADHANDLE 521 /*IllegalNFSfilehandle*/
#defineENOTSYNC 522 /*Updatesynchronizationmismatch*/
#defineEBADCOOKIE 523 /*Cookieisstale*/
#defineENOTSUPP 524 /*Operationisnotsupported*/
#defineETOOSMALL 525 /*Bufferorrequestistoosmall*/
#defineESERVERFAULT 526 /*Anuntranslatableerroroccurred*/
#defineEBADTYPE 527 /*Typenotsupportedbyserver*/
#defineEJUKEBOX 528 /*Requestinitiated,butwillnotcompletebeforetimeout*/
#defineEIOCBQUEUED 529 /*iocbqueued,willgetcompletionevent*/
#defineEIOCBRETRY 530 /*iocbqueued,willtriggeraretry*/
#endif
(注:
可编辑下载,若有不当之处,请指正,谢谢!
)
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- linux 错误 大全
![提示](https://static.bdocx.com/images/bang_tan.gif)