Linux errno Error Matrix

Source: Internet
Author: User
Tags comparison comparison table resource linux

errno defined in <errno.h>, the error Exx macros are defined in the errno-base.h and errno.h below the/usr/include/asm-generic folder, respectively, defining the 1-34, 35-132 error definition.

The strerror () function returns an error description string based on the errno value, and the following program prints the comparison table:

#include <errno.h>

#include <string.h>

#include <stdio.h>

04.

05.int Main ()

06.{

i. int i;

for (i = 0; i < 140; ++i)

09. {

errno = i;

printf ("errno%d: \t\t%s\+n", I,strerror (errno));

12.}

return 0;

14.}

Error comparison table:

Errno0:success

Errno1:operation not permitted

Errno2:no such file or directory

Errno3:no such process

errno4:interrupted system Call

Errno5:input/output Error

Errno6:no such device or address

Errno7:argument list too long

Errno8:exec Format Error

Errno9:bad File Descriptor

Errno10:no Child Processes

Errno11:resource temporarily unavailable

Errno12:cannot Allocate Memory

Errno13:permission denied

Errno14:bad Address

Errno15:block Device required

Errno16:device or resource busy

Errno17:file exists

Errno18:invalid Cross-device Link

Errno19:no such device

Errno20:not a Directory

Errno21:is a Directory

Errno22:invalid argument

Errno23:too many open files in system

More Wonderful content: http://www.bianceng.cn/Programming/cplus/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.