libc: synchronize error codes with the kernel
authorAlan Cox <alan@linux.intel.com>
Mon, 11 Jan 2016 19:23:08 +0000 (19:23 +0000)
committerAlan Cox <alan@linux.intel.com>
Mon, 11 Jan 2016 19:23:08 +0000 (19:23 +0000)
Library/include/errno.h
Library/tools/liberror.c

index 342cdee..39a027d 100644 (file)
 /* math software */
 #define EDOM            33              /* Argument too large */
 #define ERANGE          34              /* Result too large */
+
 #define EWOULDBLOCK    EAGAIN          /* Operation would block */
 #define ENOLOCK                35              /* Lock table full */
 #define ENOTEMPTY      36              /* Directory is not empty */
 #define ENAMETOOLONG    37              /* File name too long */
+#define EAFNOSUPPORT   38              /* Address family not supported */
+#define EALREADY       39              /* Operation already in progress */
+#define EADDRINUSE     40              /* Address already in use */
+#define EADDRNOTAVAIL  41              /* Address not available */
+#define ENOSYS         42              /* No such system call */
+#define EPFNOSUPPORT   43              /* Protocol not supported */
+#define EOPNOTSUPP     43              /* Operation not supported on transport endpoint */
 
-
-#define __ERRORS       38
+#define __ERRORS       44
 
 extern int sys_nerr;
 extern char *sys_errlist[];
index 8e02771..2177906 100644 (file)
@@ -3,8 +3,8 @@
 #include <string.h>
 #include <unistd.h>
 
-#define ERRORS 38
-const char *err[38] = {
+#define ERRORS 44
+const char *err[44] = {
   "Success",
   "Operation not permitted",
   "No such file or directory",
@@ -42,7 +42,12 @@ const char *err[38] = {
   "Math result not representable",
   "Lock table full",
   "Directory is not empty",
-  "File name too long"
+  "File name too long",
+  "Address family not supported",
+  "Address not available",
+  "Invalid system call number",
+  "Protocol family not supported",
+  "Operation not supported on transport endpoint"
 };
 
 static uint8_t buf[16384];