2 * The SPU must have these values match those on the PPU linux side, so
3 * the assisted calls (system or library ones) that set errno will use the
6 * This file is based on the CRIS file, with these modifications:
8 * EDEADLOCK - instead of EDEADLK (35) use 58 (for some reason ppc only does
9 * this, it is not used by ppc kernel code nor glibc code).
11 * ECANCELED value of 125 added, in linux and posix value of 125, in generic
12 * newlib errno.h, value of 140
14 * ENOTSUP as EOPNOTSUPP (95) added, in linux and posix value 95, in
15 * generic newlib errno.h, value of 134
18 /* This file is to be kept in sync with newlib/libc/include/sys/errno.h
19 on which it is based, except values used or returned by syscalls must
20 be those of the Linux ppc. */
28 #include <sys/reent.h>
30 #define errno (_impure_data._errno)
32 /* Please don't use these variables directly.
33 Use strerror instead. */
34 extern const char * const _sys_errlist
[];
37 #define __errno_r(ptr) _REENT_ERRNO(ptr)
39 /* Adjusted to the linux asm/errno.h */
40 #define EPERM 1 /* Operation not permitted */
41 #define ENOENT 2 /* No such file or directory */
42 #define ESRCH 3 /* No such process */
43 #define EINTR 4 /* Interrupted system call */
44 #define EIO 5 /* I/O error */
45 #define ENXIO 6 /* No such device or address */
46 #define E2BIG 7 /* Arg list too long */
47 #define ENOEXEC 8 /* Exec format error */
48 #define EBADF 9 /* Bad file number */
49 #define ECHILD 10 /* No child processes */
50 #define EAGAIN 11 /* Try again */
51 #define ENOMEM 12 /* Out of memory */
52 #define EACCES 13 /* Permission denied */
53 #define EFAULT 14 /* Bad address */
54 #define ENOTBLK 15 /* Block device required */
55 #define EBUSY 16 /* Device or resource busy */
56 #define EEXIST 17 /* File exists */
57 #define EXDEV 18 /* Cross-device link */
58 #define ENODEV 19 /* No such device */
59 #define ENOTDIR 20 /* Not a directory */
60 #define EISDIR 21 /* Is a directory */
61 #define EINVAL 22 /* Invalid argument */
62 #define ENFILE 23 /* File table overflow */
63 #define EMFILE 24 /* Too many open files */
64 #define ENOTTY 25 /* Not a typewriter */
65 #define ETXTBSY 26 /* Text file busy */
66 #define EFBIG 27 /* File too large */
67 #define ENOSPC 28 /* No space left on device */
68 #define ESPIPE 29 /* Illegal seek */
69 #define EROFS 30 /* Read-only file system */
70 #define EMLINK 31 /* Too many links */
71 #define EPIPE 32 /* Broken pipe */
72 #define EDOM 33 /* Math argument out of domain of func */
73 #define ERANGE 34 /* Math result not representable */
74 #define EDEADLK 35 /* Resource deadlock would occur */
75 #define ENAMETOOLONG 36 /* File name too long */
76 #define ENOLCK 37 /* No record locks available */
77 #define ENOSYS 38 /* Function not implemented */
78 #define ENOTEMPTY 39 /* Directory not empty */
79 #define ELOOP 40 /* Too many symbolic links encountered */
80 #define EWOULDBLOCK EAGAIN /* Operation would block */
81 #define ENOMSG 42 /* No message of desired type */
82 #define EIDRM 43 /* Identifier removed */
83 #define ECHRNG 44 /* Channel number out of range */
84 #define EL2NSYNC 45 /* Level 2 not synchronized */
85 #define EL3HLT 46 /* Level 3 halted */
86 #define EL3RST 47 /* Level 3 reset */
87 #define ELNRNG 48 /* Link number out of range */
88 #define EUNATCH 49 /* Protocol driver not attached */
89 #define ENOCSI 50 /* No CSI structure available */
90 #define EL2HLT 51 /* Level 2 halted */
91 #define EBADE 52 /* Invalid exchange */
92 #define EBADR 53 /* Invalid request descriptor */
93 #define EXFULL 54 /* Exchange full */
94 #define ENOANO 55 /* No anode */
95 #define EBADRQC 56 /* Invalid request code */
96 #define EBADSLT 57 /* Invalid slot */
100 #define EBFONT 59 /* Bad font file format */
101 /* This is only used internally in newlib; not returned by the kernel.
102 EBFONT seems the closest match for a "bad file format" error. */
103 #define EFTYPE EBFONT /* Inappropriate file type or format */
104 #define ENOSTR 60 /* Device not a stream */
105 #define ENODATA 61 /* No data available */
106 #define ETIME 62 /* Timer expired */
107 #define ENOSR 63 /* Out of streams resources */
108 #define ENONET 64 /* Machine is not on the network */
109 #define ENOPKG 65 /* Package not installed */
110 #define EREMOTE 66 /* Object is remote */
111 #define ENOLINK 67 /* Link has been severed */
112 #define EADV 68 /* Advertise error */
113 #define ESRMNT 69 /* Srmount error */
114 #define ECOMM 70 /* Communication error on send */
115 #define EPROTO 71 /* Protocol error */
116 #define EMULTIHOP 72 /* Multihop attempted */
117 #define EDOTDOT 73 /* RFS specific error */
118 #define EBADMSG 74 /* Not a data message */
119 #define EOVERFLOW 75 /* Value too large for defined data type */
120 #define ENOTUNIQ 76 /* Name not unique on network */
121 #define EBADFD 77 /* File descriptor in bad state */
122 #define EREMCHG 78 /* Remote address changed */
123 #define ELIBACC 79 /* Can not access a needed shared library */
124 #define ELIBBAD 80 /* Accessing a corrupted shared library */
125 #define ELIBSCN 81 /* .lib section in a.out corrupted */
126 #define ELIBMAX 82 /* Attempting to link in too many shared libraries */
127 #define ELIBEXEC 83 /* Cannot exec a shared library directly */
128 #define EILSEQ 84 /* Illegal byte sequence */
129 #define ERESTART 85 /* Interrupted system call should be restarted */
130 #define ESTRPIPE 86 /* Streams pipe error */
131 #define EUSERS 87 /* Too many users */
132 #define ENOTSOCK 88 /* Socket operation on non-socket */
133 #define EDESTADDRREQ 89 /* Destination address required */
134 #define EMSGSIZE 90 /* Message too long */
135 #define EPROTOTYPE 91 /* Protocol wrong type for socket */
136 #define ENOPROTOOPT 92 /* Protocol not available */
137 #define EPROTONOSUPPORT 93 /* Protocol not supported */
138 #define ESOCKTNOSUPPORT 94 /* Socket type not supported */
139 #define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
140 #define ENOTSUP EOPNOTSUPP
141 #define EPFNOSUPPORT 96 /* Protocol family not supported */
142 #define EAFNOSUPPORT 97 /* Address family not supported by protocol */
143 #define EADDRINUSE 98 /* Address already in use */
144 #define EADDRNOTAVAIL 99 /* Cannot assign requested address */
145 #define ENETDOWN 100 /* Network is down */
146 #define ENETUNREACH 101 /* Network is unreachable */
147 #define ENETRESET 102 /* Network dropped connection because of reset */
148 #define ECONNABORTED 103 /* Software caused connection abort */
149 #define ECONNRESET 104 /* Connection reset by peer */
150 #define ENOBUFS 105 /* No buffer space available */
151 #define EISCONN 106 /* Transport endpoint is already connected */
152 #define ENOTCONN 107 /* Transport endpoint is not connected */
153 #define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */
154 #define ETOOMANYREFS 109 /* Too many references: cannot splice */
155 #define ETIMEDOUT 110 /* Connection timed out */
156 #define ECONNREFUSED 111 /* Connection refused */
157 #define EHOSTDOWN 112 /* Host is down */
158 #define EHOSTUNREACH 113 /* No route to host */
159 #define EALREADY 114 /* Operation already in progress */
160 #define EINPROGRESS 115 /* Operation now in progress */
161 #define ESTALE 116 /* Stale NFS file handle */
162 #define EUCLEAN 117 /* Structure needs cleaning */
163 #define ENOTNAM 118 /* Not a XENIX named type file */
164 #define ENAVAIL 119 /* No XENIX semaphores available */
165 #define EISNAM 120 /* Is a named type file */
166 #define EREMOTEIO 121 /* Remote I/O error */
167 #define EDQUOT 122 /* Quota exceeded */
169 #define ENOMEDIUM 123 /* No medium found */
170 #define EMEDIUMTYPE 124 /* Wrong medium type */
171 #define ECANCELED 125 /* Operation Canceled */
173 #define __ELASTERROR 2000 /* Users can add values starting here */
178 #endif /* _SYS_ERRNO_H */