- 1、本文档共5页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
linux错误码大全
linux错误码大全查看错误代码errno是调试程序的一个重要方法。当linuc C api函数发生异常时,一般会将errno变量(需include errno.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 ? ?/* Operation not permitted */#define ? ?ENOENT ? ? ? ? 2 ? ?/* 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 ? ?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 ? ?/* Permission denied */#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 ? ? ? ?2
文档评论(0)