Linux Io Error Codes
Contents |
Aug 2004 on RedHat 7.3 #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 linux errno example 6 /* No such device or address */ #define E2BIG 7 /* Arg list too long */ posix error codes #define ENOEXEC 8 /* Exec format error */ #define EBADF 9 /* Bad file number */ #define ECHILD 10 /* No child processes */ #define EAGAIN linux errno to string 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
Errno.h Linux Kernel
*/ #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 errno.h windows */ #define ENOSPC 28 /* No space left on device */ #define ESPIPE 29 /* Illegal seek */ #define EROFS 30 /* Read-only file system */ #define EMLINK 31 /* Too many 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 would occur */ #define ENAMETOOLONG 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 many symbolic links encountered */ #define EWOULDBLOCK EAGAIN /* Operation would 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 EDEADLOC
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss errno.h in c the workings and policies of this site About Us Learn more about
Efault
Stack Overflow the company Business Learn more about hiring developers or posting ads with us Unix & Linux
Enxio
Questions Tags Users Badges Unanswered Ask Question _ Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join http://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Understand error codes in Linux up vote 4 down vote favorite I am working on Linux (Kernel Version 2.6.32.28) laptop. After I inserted/did file io/removed a SD combo card, http://unix.stackexchange.com/questions/8355/understand-error-codes-in-linux I got following errors: mmcblk0: error -123 sending status command mmcblk0: error -123 sending read/write command, response 0x0, card status 0x0 mmcblk0: error -123 sending requesting status Now, I would like to understand what these errors mean. As I saw few standard error codes are located in arch/powerpc/boot/stdio.h and other scattered at various other places.. Is there any systematic way in Linux to track (& understand) the error codes (in the source) ? linux system-calls error-handling share|improve this question edited Feb 11 '12 at 0:00 Gilles 372k696761127 asked Feb 28 '11 at 7:02 TheCottonSilk 13327 migrated from stackoverflow.com Feb 28 '11 at 20:33 This question came from our site for professional and enthusiast programmers. add a comment| 4 Answers 4 active oldest votes up vote 5 down vote accepted There are standard error values, defined in errno.h. You can look at this file on your system to see the numerical values. On most systems, they're in /usr/include/errno.h or a file that it includes. On Linux, most are in /usr/include/asm-generic/errno-base.h or /usr/include/asm-generic/errno.h, with a few more in /usr/include/bits/errno.h. If
codes can’t occur on GNU systems, but they can occur using the GNU C Library on other systems. Macro: int EPERM Operation not permitted; only the owner of the file (or other resource) or processes with special http://www.gnu.org/s/libc/manual/html_node/Error-Codes.html privileges can perform the operation. Macro: int ENOENT No such file or directory. This is http://www.ioplex.com/~miallen/errcmp.html a “file doesn’t exist” error for ordinary files that are referenced in contexts where they are expected to already exist. Macro: int ESRCH No process matches the specified process ID. Macro: int EINTR Interrupted function call; an asynchronous signal occurred and prevented completion of the call. When this happens, you should try the call again. You can choose to have error codes functions resume after a signal that is handled, rather than failing with EINTR; see Interrupted Primitives. Macro: int EIO Input/output error; usually used for physical read or write errors. Macro: int ENXIO No such device or address. The system tried to use the device represented by a file you specified, and it couldn’t find the device. This can mean that the device file was installed incorrectly, or that the physical device is missing or linux io error not correctly attached to the computer. Macro: int E2BIG Argument list too long; used when the arguments passed to a new program being executed with one of the exec functions (see Executing a File) occupy too much memory space. This condition never arises on GNU/Hurd systems. Macro: int ENOEXEC Invalid executable file format. This condition is detected by the exec functions; see Executing a File. Macro: int EBADF Bad file descriptor; for example, I/O on a descriptor that has been closed or reading from a descriptor open only for writing (or vice versa). Macro: int ECHILD There are no child processes. This error happens on operations that are supposed to manipulate child processes, when there aren’t any processes to manipulate. Macro: int EDEADLK Deadlock avoided; allocating a system resource would have resulted in a deadlock situation. The system does not guarantee that it will notice all such situations. This error means you got lucky and the system noticed; it might just hang. See File Locks, for an example. Macro: int ENOMEM No memory available. The system cannot allocate more virtual memory because its capacity is full. Macro: int EACCES Permission denied; the file permissions do not allow the attempted operation. Macro: int EFAULT Bad address; an invalid pointer was detected. On GNU/Hurd systems, this error never happens; you get a signal
found (1 meaning all). See also the Popular Errno Codes by Platform page which displays only errno identifiers that are found on all systems (excluding MS Windows). SUSv3 AIX 4.3,5.1 HP-UX 11.22 Solaris 9,10 Linux 2.4.28,2.6.9 IRIX 6.5[4] OSF1 FreeBSD 5.2.1 OSX 10.3.8 MSVC6 EPERM10Operation not permitted.1Operation not permitted1Not super-user1Not super-user1Operation not permitted1Operation not permitted1Not owner1Operation not permitted1Operation not permitted1Operation not permitted ENOENT10No such file or directory.2No such file or directory2No such file or directory2No such file or directory2No such file or directory2No such file or directory2No such file or directory2No such file or directory2No such file or directory2No such file or directory ESRCH10No such process.3No such process3No such process3No such process3No such process3No such process3No such process3No such process3No such process3No such process EINTR10Interrupted function.4interrupted system call4interrupted system call4interrupted system call4Interrupted system call4Interrupted function call4Interrupted system call4Interrupted system call4Interrupted system call4Interrupted function call EIO10I/O error.5I/O error5I/O error5I/O error5I/O error5I/O error5I/O error5Input/output error5Input/output error5Input/output error ENXIO10No such device or address.6No such device or address6No such device or address6No such device or address6No such device or address6No such device or address6No such device or address6Device not configured6Device not configured6No such device or address E2BIG10Argument list too long.7Arg list too long7Arg list too long7Arg list too long7Arg list too long7Arg list too long7Arg list too long7Argument list too long7Argument list too long7Arg list too long ENOEXEC10Executable file format error.8Exec format error8Exec format error8Exec format error8Exec format error8Exec format error8Exec format error8Exec format error8Exec format error8Exec format error EBADF10Bad file descriptor.9Bad file descriptor9Bad file number9Bad file number9Bad file number9Bad file number9Bad file number9Bad file descriptor9Bad file descriptor9Bad file descriptor ECHILD10No child processes.10No child processes10No children10No children10No child processes10No child processes10No children10No child processes10No child processes10No child processes EAGAIN10Resource unavailable, try again [3]11Resource temporarily unavailable11No more processes11Resource temporarily una