commit ecdf07d522ccf550a3763da83a8419dc91f79b62
parent f1eb23a62f7188b14962cfeba4dd26512947163e
Author: Dimitris Papastamos <dimitris.papastamos@arm.com>
Date: Thu, 8 Nov 2018 14:48:06 +0000
Merge "[amd64] Add errno list for OpenBSD"
Diffstat:
3 files changed, 119 insertions(+), 23 deletions(-)
diff --git a/include/bits/openbsd/sys/errno.h b/include/bits/openbsd/sys/errno.h
@@ -1,4 +1,3 @@
-#define EWOULDBLOCK EAGAIN
#define EPERM 1
#define ENOENT 2
#define ESRCH 3
@@ -80,19 +79,18 @@
#define EFTYPE 79
#define EAUTH 80
#define ENEEDAUTH 81
-#define EIDRM 82
-#define ENOMSG 83
-#define EOVERFLOW 84
-#define EILSEQ 85
-#define ENOTSUP 86
-#define ECANCELED 87
-#define EBADMSG 88
-#define ENODATA 89
-#define ENOSR 90
-#define ENOSTR 91
-#define ETIME 92
-#define ENOATTR 93
-#define EMULTIHOP 94
-#define ENOLINK 95
-#define ELAST 96
-#define EPROTO 96
+#define EIPSEC 82
+#define ENOATTR 83
+#define EILSEQ 84
+#define ENOMEDIUM 85
+#define EMEDIUMTYPE 86
+#define EOVERFLOW 87
+#define ECANCELED 88
+#define EIDRM 89
+#define ENOMSG 90
+#define ENOTSUP 91
+#define EBADMSG 92
+#define ENOTRECOVERABLE 93
+#define EOWNERDEAD 94
+#define ELAST 95
+#define EPROTO 95
diff --git a/src/libc/arch/amd64/openbsd/Makefile b/src/libc/arch/amd64/openbsd/Makefile
@@ -1,6 +1,7 @@
.POSIX:
PROJECTDIR =../../../../..
include $(PROJECTDIR)/scripts/rules.mk
+include ../../rules.mk
OBJS = _Exit.o \
_close.o \
@@ -13,11 +14,12 @@ OBJS = _Exit.o \
_brk.o \
_getheap.o \
_sigaction.o\
- _tzone.o\
- getenv.o\
- raise.o\
- signal.o\
- time.o\
+ _tzone.o \
+ getenv.o \
+ raise.o \
+ signal.o \
+ time.o \
+ _sys_errlist.o \
all: syscall
$(MAKE) objs
@@ -30,4 +32,4 @@ syscall: syscall.lst
clean:
rm -f `awk '/[0-9]* _/ {print $$2".s"}' syscall.lst`
- rm -f syscall
+ rm -f syscall _sys_errlist.c
diff --git a/src/libc/arch/amd64/openbsd/errno.lst b/src/libc/arch/amd64/openbsd/errno.lst
@@ -0,0 +1,96 @@
+EPERM 1 Operation not permitted
+ENOENT 2 No such file or directory
+ESRCH 3 No such process
+EINTR 4 Interrupted system call
+EIO 5 Input/output error
+ENXIO 6 Device not configured
+E2BIG 7 Argument list too long
+ENOEXEC 8 Exec format error
+EBADF 9 Bad file descriptor
+ECHILD 10 No child processes
+EDEADLK 11 Resource deadlock avoided
+ENOMEM 12 Cannot allocate memory
+EACCES 13 Permission denied
+EFAULT 14 Bad address
+ENOTBLK 15 Block device required
+EBUSY 16 Device busy
+EEXIST 17 File exists
+EXDEV 18 Cross-device link
+ENODEV 19 Operation not supported by device
+ENOTDIR 20 Not a directory
+EISDIR 21 Is a directory
+EINVAL 22 Invalid argument
+ENFILE 23 Too many open files in system
+EMFILE 24 Too many open files
+ENOTTY 25 Inappropriate ioctl for device
+ETXTBSY 26 Text file busy
+EFBIG 27 File too large
+ENOSPC 28 No space left on device
+ESPIPE 29 Illegal seek
+EROFS 30 Read-only file system
+EMLINK 31 Too many links
+EPIPE 32 Broken pipe
+EDOM 33 Numerical argument out of domain
+ERANGE 34 Result too large
+EAGAIN 35 Resource temporarily unavailable
+EINPROGRESS 36 Operation now in progress
+EALREADY 37 Operation already in progress
+ENOTSOCK 38 Socket operation on non-socket
+EDESTADDRREQ 39 Destination address required
+EMSGSIZE 40 Message too long
+EPROTOTYPE 41 Protocol wrong type for socket
+ENOPROTOOPT 42 Protocol not available
+EPROTONOSUPPORT 43 Protocol not supported
+ESOCKTNOSUPPORT 44 Socket type not supported
+EOPNOTSUPP 45 Operation not supported
+EPFNOSUPPORT 46 Protocol family not supported
+EAFNOSUPPORT 47 Address family not supported by protocol family
+EADDRINUSE 48 Address already in use
+EADDRNOTAVAIL 49 Can't assign requested address
+ENETDOWN 50 Network is down
+ENETUNREACH 51 Network is unreachable
+ENETRESET 52 Network dropped connection on reset
+ECONNABORTED 53 Software caused connection abort
+ECONNRESET 54 Connection reset by peer
+ENOBUFS 55 No buffer space available
+EISCONN 56 Socket is already connected
+ENOTCONN 57 Socket is not connected
+ESHUTDOWN 58 Can't send after socket shutdown
+ETOOMANYREFS 59 Too many references: can't splice
+ETIMEDOUT 60 Operation timed out
+ECONNREFUSED 61 Connection refused
+ELOOP 62 Too many levels of symbolic links
+ENAMETOOLONG 63 File name too long
+EHOSTDOWN 64 Host is down
+EHOSTUNREACH 65 No route to host
+ENOTEMPTY 66 Directory not empty
+EPROCLIM 67 Too many processes
+EUSERS 68 Too many users
+EDQUOT 69 Disk quota exceeded
+ESTALE 70 Stale NFS file handle
+EREMOTE 71 Too many levels of remote in path
+EBADRPC 72 RPC struct is bad
+ERPCMISMATCH 73 RPC version wrong
+EPROGUNAVAIL 74 RPC program not available
+EPROGMISMATCH 75 Program version wrong
+EPROCUNAVAIL 76 Bad procedure for program
+ENOLCK 77 No locks available
+ENOSYS 78 Function not implemented
+EFTYPE 79 Inappropriate file type or format
+EAUTH 80 Authentication error
+ENEEDAUTH 81 Need authenticator
+EIPSEC 82 IPsec processing failure
+ENOATTR 83 Attribute not found
+EILSEQ 84 Illegal byte sequence
+ENOMEDIUM 85 No medium found
+EMEDIUMTYPE 86 Wrong medium type
+EOVERFLOW 87 Value too large to be stored in data type
+ECANCELED 88 Operation canceled
+EIDRM 89 Identifier removed
+ENOMSG 90 No message of desired type
+ENOTSUP 91 Not supported
+EBADMSG 92 Bad message
+ENOTRECOVERABLE 93 State not recoverable
+EOWNERDEAD 94 Previous owner died
+EPROTO 95 Protocol error
+ELAST 95 Must be equal largest errno