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/