From 6a6d68103fff729d8ba658bfb1be296664d471d8 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 11 Jan 2016 19:23:08 +0000 Subject: [PATCH] libc: synchronize error codes with the kernel --- Library/include/errno.h | 11 +++++++++-- Library/tools/liberror.c | 11 ++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Library/include/errno.h b/Library/include/errno.h index 342cdee3..39a027d6 100644 --- a/Library/include/errno.h +++ b/Library/include/errno.h @@ -43,13 +43,20 @@ /* 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[]; diff --git a/Library/tools/liberror.c b/Library/tools/liberror.c index 8e027713..21779069 100644 --- a/Library/tools/liberror.c +++ b/Library/tools/liberror.c @@ -3,8 +3,8 @@ #include #include -#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]; -- 2.34.1