Errno. H --
Query
Checking the error code errno is an important way to debug the program. When the linuc c api function is abnormal, The errno variable (including
Errno. h) assign an integer. Different values indicate different meanings. You can view the cause of the error by checking the value. In actual programming, this solution solves many seemingly inexplicable problems. Comparison
The trouble is that every time I go to the Linux source code to find out the meaning of the error code, I will post it and I will check it later.
The following is the/usr/include/ASM/errno. h kernel code from Linux 2.4.20-18.
# Ifndef _ i1__errno_h
# DEFINE _ i1__errno_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/* Arg 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 program 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 29/* illegal seek */
# Define erofs 30/* read-only file system */
# Define emlink 31/* too worker links */
# Define epipe 32/* broken pipe */
# Define Edom 33/* Math argument out of domain of func */
# Define erange 34/* Math result not representable */
# Define edeadlk 35/* Resource deadlock wocould occur */
# Define enamlong long 36/* File Name Too Long */
# Define enolck 37/* No record locks available */
# Define enosys 38/* function not implemented */
# Define enotempty 39/* directory not empty */
# Define eloop 40/* too define symbolic links encountered */
# Define ewouldblock eagain/* operation wocould block */
# Define enomsg 42/* No message of desired type */
# Define eidrm 43/* identifier removed */
# Define echrng 44/* channel number out of range */
# Define el2nsync 45/* level 2 not synchronized */
# Define el3hlt 46/* level 3 halted */
# Define el3rst 47/* level 3 reset */
# Define elnrng 48/* Link number out of range */
# Define eunatch 49/* protocol driver not attached */
# Define enocsi 50/* No CSI structure available */
# Define el2hlt 51/* level 2 halted */
# Define ebade 52/* invalid exchange */
# Define ebadr 53/* invalid request descriptor */
# Define exfull 54/* exchange full */
# Define enoano 55/* No anode */
# Define ebadrqc 56/* invalid request code */
# Define ebadslt 57/* invalid slot */
# Define edeadlock edeadlk
# Define ebfont 59/* bad font file format */
# Define enostr 60/* device not a stream */
# Define enodata 61/* No data available */
# Define etime 62/* timer expired */
# Define enosr 63/* Out of streams Resources */
# Define enonet 64/* machine is not on the Network */
# Define enopkg 65/* package not installed */
# Define eremote 66/* object is remote */
# Define enolink 67/* link has been severed */
# Define eadv 68/* advertise Error */
# Define esrmnt 69/* srmount Error */
# Define ecomm 70/* communication error on send */
# Define eproto 71/* Protocol Error */
# Define emultihop 72/* multihop attempted */
# Define edotdot 73/* RFS specific error */
# Define ebadmsg 74/* not a data message */
# Define eoverflow 75/* value too large for defined data type */
# Define enotuniq 76/* name not unique on Network */
# Define ebadfd 77/* file descriptor in bad state */
# Define eremchg 78/* remote address changed */
# Define elibacc 79/* can not access a needed shared library */
# Define elibbad 80/* accessing a specified upted shared library */
# Define elibscn 81/*. Lib section in A. Out partition upted */
# Define elibmax 82/* attempting to link in too functions shared libraries
*/
# Define elibexec 83/* cannot exec a shared library directly */
# Define eilseq 84/* illegal byte sequence */
# Define erestart 85/* interrupted System Call shoshould be restarted */
# Define estrpipe 86/* streams pipe Error */
# Define eusers 87/* too worker users */
# Define enotsock 88/* socket operation on Non-socket */
# Define edestaddrreq 89/* destination address required */
# Define emsgsize 90/* message too long */
# Define eprototype 91/* protocol wrong type for socket */
# Define enoprotoopt 92/* protocol not available */
# Define eprotonosupport 93/* protocol not supported */
# Define esocktnosupport 94/* socket type not supported */
# Define eopnotsupp 95/* operation not supported on transport endpoint
*/
# Define epfnosupport 96/* protocol family not supported */
# Define eafnosupport 97/* address family not supported by Protocol */
# Define eaddrinuse 98/* address already in use */
# Define eaddrnotavail 99/* cannot assign requested address */
# Define enetdown 100/* network is down */
# Define enetunreach 101/* network is unreachable */
# Define enetreset 102/* network dropped connection because of Reset */
# Define econnaborted 103/* software caused connection abort */
# Define econnreset 104/* Connection reset by peer */
# Define enobufs 105/* No buffer space available */
# Define eisconn 106/* transport endpoint is already connected */
# Define enotconn 107/* transport endpoint is not connected */
# Define eshudown 108/* cannot send after transport endpoint Shutdown
*/
# Define enough manyrefs 109/* too enough references: cannot splice */
# Define etimedout 110/* connection timed out */
# Define econnrefused 111/* connection refused */
# Define ehostdown 112/* Host is down */
# Define ehostunreach 113/* No route to host */
# Define ealready 114/* operation already in progress */
# Define einprogress 115/* operation now in progress */
# Define estale 116/* stale NFS file handle */
# Define euclean 117/* structure needs cleaning */
# Define enotnam 118/* Not a xenix named type file */
# Define enavail 119/* No XENIX semaphores available */
# Define eisnam 120/* is a named type file */
# Define eremoteio 121/* remote I/O Error */
# Define edquot 122/* Quota exceeded */
# Define enomedium 123/* No medium found */
# Define emediumtype 124/* wrong medium type */
# Endif