【Linux 】errno 错误码对照表和宏|error, test ok

发布时间:2024年01月23日

错误码对应宏

EPERM		    1    /* Operation not permitted*/
ENOENT		    2    /* No such file or directory*/
ESRCH		    3    /* No such process*/
EINTR		    4    /* Interrupted system call*/
EIO			    5    /* I/O error*/
ENXIO		    6    /* No such device or address*/
E2BIG 		    7    /* Argument list too long*/
ENOEXEC		    8    /* Exec format error*/
EBADF		    9    /* Bad file number*/
ECHILD 		    10   /* No child processes*/
EAGAIN 	        11   /* Try again*/
ENOMEM		    12   /* Out of memory*/
EACCES		    13   /* Permission denied*/
EFAULT          14   /* Bad address*/
ENOTBLK         15   /* Block device required*/
EBUSY           16   /* Device or resource busy*/
EEXIST          17   /* File exists*/
EXDEV           18   /* Cross-device link*/
ENODEV          19   /* No such device*/
ENOTDIR         20   /* Not a directory*/
EISDIR          21   /* Is a directory*/
EINVAL          22   /* Invalid argument*/
ENFILE          23   /* File table overflow*/
EMFILE          24   /* Too many open files*/
ENOTTY          25   /* Not a typewriter*/
ETXTBSY         26   /* Text file busy*/
EFBIG           27   /* File too large*/
ENOSPC          28   /* No space left on device*/
ESPIPE          29   /* Illegal seek*/
EROFS           30   /* Read-only file system*/
EMLINK          31   /* Too many links*/
EPIPE           32   /* Broken pipe*/
EDOM            33   /* Math argument out of domainof func */
ERANGE          34   /* Math result notrepresentable */
EDEADLK         35   /* Resource deadlock wouldoccur */
ENAMETOOLONG    36   /* File name too long */
ENOLCK          37   /* No record locks available*/
ENOSYS          38   /* Function not implemented*/
ENOTEMPTY       39   /*Directory not empty */
ELOOP           40   /* Too many symbolic linksencountered */
EWOULDBLOCK   EAGAIN /*Operation would block */
ENOMSG          42   /* No message of desired type*/
EIDRM           43   /* Identifier removed*/
ECHRNG          44   /* Channel number out of range*/
EL2NSYNC        45   /* Level2 not synchronized */
EL3HLT          46   /* Level 3 halted*/
EL3RST          47   /* Level 3 reset*/
ELNRNG          48   /* Link number out of range*/
EUNATCH         49   /* Protocol driver notattached */
ENOCSI          50   /* No CSI structure available*/
EL2HLT          51   /* Level 2 halted*/
EBADE           52   /* Invalid exchange*/
EBADR           53   /* Invalid request descriptor*/
EXFULL          54   /* Exchange full*/
ENOANO          55   /* No anode*/
EBADRQC         56   /* Invalid request code*/
EBADSLT         57   /* Invalid slot*/
EDEADLOCK       EDEADLK
EBFONT          59   /* Bad font file format*/
ENOSTR          60   /* Device not a stream*/
ENODATA         61   /* No data available*/
ETIME           62   /* Timer expired*/
ENOSR           63   /* Out of streams resources*/
ENONET          64   /* Machine is not on thenetwork */
ENOPKG          65   /* Package not installed*/
EREMOTE         6
文章来源:https://blog.csdn.net/hfut31415926/article/details/135782245
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。