Browse Source

Distinguish between ENOMEM (as representing a lack of internal memory

as allocated by malloc()) versus all other errors, in particular
ENOBUFS (representing a lack of external buffer space, e.g. in a
device's TX queue or a user buffer).
tags/v0.9.3
Michael Brown 18 years ago
parent
commit
6a03552381
1 changed files with 18 additions and 18 deletions
  1. 18
    18
      src/include/errno.h

+ 18
- 18
src/include/errno.h View File

@@ -145,29 +145,29 @@
145 145
 #define ENFILE		EMFILE	/**< Too many open files in system */
146 146
 /** Cannot allocate memory */
147 147
 #define ENOMEM		PXENV_STATUS_OUT_OF_RESOURCES
148
-#define ENOBUFS		ENOMEM	/**< No buffer space available */
149
-#define ENODATA		0xe6	/**< No data available */
150
-#define ENODEV		0xe7	/**< No such device */
151
-#define ENOENT		0xe8	/**< No such file or directory */
152
-#define ENOEXEC		0xe9	/**< Exec format error */
148
+#define ENOBUFS		0xe6	/**< No buffer space available */
149
+#define ENODATA		0xe7	/**< No data available */
150
+#define ENODEV		0xe8	/**< No such device */
151
+#define ENOENT		0xe9	/**< No such file or directory */
152
+#define ENOEXEC		0xea	/**< Exec format error */
153 153
 #define ENOMSG		ENODATA	/**< No message of the desired type */
154
-#define ENOSPC		0xea	/**< No space left on device */
155
-#define ENOSR		0xeb	/**< No stream resources */
156
-#define ENOSTR		0xec	/**< Not a stream */
157
-#define ENOSYS		0xed	/**< Function not implemented */
158
-#define ENOTCONN	0xee	/**< Transport endpoint is not connected */
159
-#define ENOTSOCK	0xef	/**< Socket operation on non-socket */
160
-#define EOPNOTSUPP	0xf0	/**< Operation not supported */
154
+#define ENOSPC		0xeb	/**< No space left on device */
155
+#define ENOSR		0xec	/**< No stream resources */
156
+#define ENOSTR		0xed	/**< Not a stream */
157
+#define ENOSYS		0xee	/**< Function not implemented */
158
+#define ENOTCONN	0xef	/**< Transport endpoint is not connected */
159
+#define ENOTSOCK	0xf0	/**< Socket operation on non-socket */
160
+#define EOPNOTSUPP	0xf1	/**< Operation not supported */
161 161
 #define ENOTSUP		EOPNOTSUPP /**< Not supported */
162
-#define ENOTTY		0xf1	/**< Inappropriate ioctl for device */
162
+#define ENOTTY		0xf2	/**< Inappropriate ioctl for device */
163 163
 #define ENXIO		ENODEV	/**< No such device or address */
164
-#define EOVERFLOW	0xf2	/**< Result too large */
164
+#define EOVERFLOW	0xf3	/**< Result too large */
165 165
 #define EPERM		EACCES	/**< Operation not permitted */
166
-#define EPROTO		0xf3	/**< Protocol error */
167
-#define EPROTONOSUPPORT	0xf4	/**< Protocol not supported */
168
-#define EPROTOTYPE	0xf5	/**< Protocol wrong type for socket */
166
+#define EPROTO		0xf4	/**< Protocol error */
167
+#define EPROTONOSUPPORT	0xf5	/**< Protocol not supported */
168
+#define EPROTOTYPE	0xf6	/**< Protocol wrong type for socket */
169 169
 #define ERANGE		EOVERFLOW /**< Result too large */
170
-#define ETIMEDOUT	0xf6	/**< Connection timed out */
170
+#define ETIMEDOUT	0xf7	/**< Connection timed out */
171 171
 #define EWOULDBLOCK	EAGAIN	/**< Resource temporarily unavailable */
172 172
 
173 173
 extern int errno;

Loading…
Cancel
Save