commit 611aa68ba45595eddd5df19e5a2801456800f656
parent 977435ef47f7422b4439104aade20bdd325d86a9
Author: Roberto Vargas <roberto.vargas@arm.com>
Date: Thu, 8 Nov 2018 17:27:51 +0000
[libc] Generate errno.h from a master file for rmode
It makes rmode more orthogonal and it allows to produce
_sys_errlist.c.
Change-Id: I096124886b93957e8d481330e01a16a5a7f9144f
Diffstat:
5 files changed, 45 insertions(+), 132 deletions(-)
diff --git a/include/bits/rmode/sys/errno.h b/include/bits/rmode/sys/errno.h
@@ -1,131 +0,0 @@
-#define EPERM 1
-#define ENOENT 2
-#define ESRCH 3
-#define EINTR 4
-#define EIO 5
-#define ENXIO 6
-#define E2BIG 7
-#define ENOEXEC 8
-#define EBADF 9
-#define ECHILD 10
-#define EAGAIN 11
-#define ENOMEM 12
-#define EACCES 13
-#define EFAULT 14
-#define ENOTBLK 15
-#define EBUSY 16
-#define EEXIST 17
-#define EXDEV 18
-#define ENODEV 19
-#define ENOTDIR 20
-#define EISDIR 21
-#define EINVAL 22
-#define ENFILE 23
-#define EMFILE 24
-#define ENOTTY 25
-#define ETXTBSY 26
-#define EFBIG 27
-#define ENOSPC 28
-#define ESPIPE 29
-#define EROFS 30
-#define EMLINK 31
-#define EPIPE 32
-#define EDOM 33
-#define ERANGE 34
-#define EDEADLK 35
-#define ENAMETOOLONG 36
-#define ENOLCK 37
-#define ENOSYS 38
-#define ENOTEMPTY 39
-#define ELOOP 40
-#define ENOMSG 42
-#define EIDRM 43
-#define ECHRNG 44
-#define EL2NSYNC 45
-#define EL3HLT 46
-#define EL3RST 47
-#define ELNRNG 48
-#define EUNATCH 49
-#define ENOCSI 50
-#define EL2HLT 51
-#define EBADE 52
-#define EBADR 53
-#define EXFULL 54
-#define ENOANO 55
-#define EBADRQC 56
-#define EBADSLT 57
-#define EBFONT 59
-#define ENOSTR 60
-#define ENODATA 61
-#define ETIME 62
-#define ENOSR 63
-#define ENONET 64
-#define ENOPKG 65
-#define EREMOTE 66
-#define ENOLINK 67
-#define EADV 68
-#define ESRMNT 69
-#define ECOMM 70
-#define EPROTO 71
-#define EMULTIHOP 72
-#define EDOTDOT 73
-#define EBADMSG 74
-#define EOVERFLOW 75
-#define ENOTUNIQ 76
-#define EBADFD 77
-#define EREMCHG 78
-#define ELIBACC 79
-#define ELIBBAD 80
-#define ELIBSCN 81
-#define ELIBMAX 82
-#define ELIBEXEC 83
-#define EILSEQ 84
-#define ERESTART 85
-#define ESTRPIPE 86
-#define EUSERS 87
-#define ENOTSOCK 88
-#define EDESTADDRREQ 89
-#define EMSGSIZE 90
-#define EPROTOTYPE 91
-#define ENOPROTOOPT 92
-#define EPROTONOSUPPORT 93
-#define ESOCKTNOSUPPORT 94
-#define EOPNOTSUPP 95
-#define EPFNOSUPPORT 96
-#define EAFNOSUPPORT 97
-#define EADDRINUSE 98
-#define EADDRNOTAVAIL 99
-#define ENETDOWN 100
-#define ENETUNREACH 101
-#define ENETRESET 102
-#define ECONNABORTED 103
-#define ECONNRESET 104
-#define ENOBUFS 105
-#define EISCONN 106
-#define ENOTCONN 107
-#define ESHUTDOWN 108
-#define ETOOMANYREFS 109
-#define ETIMEDOUT 110
-#define ECONNREFUSED 111
-#define EHOSTDOWN 112
-#define EHOSTUNREACH 113
-#define EALREADY 114
-#define EINPROGRESS 115
-#define ESTALE 116
-#define EUCLEAN 117
-#define ENOTNAM 118
-#define ENAVAIL 119
-#define EISNAM 120
-#define EREMOTEIO 121
-#define EDQUOT 122
-#define ENOMEDIUM 123
-#define EMEDIUMTYPE 124
-#define ECANCELED 125
-#define ENOKEY 126
-#define EKEYEXPIRED 127
-#define EKEYREVOKED 128
-#define EKEYREJECTED 129
-#define EOWNERDEAD 130
-#define ENOTRECOVERABLE 131
-#define ERFKILL 132
-#define EHWPOISON 133
diff --git a/src/libc/arch/arm64/linux/Makefile b/src/libc/arch/arm64/linux/Makefile
@@ -20,6 +20,7 @@ OBJS = _Exit.o \
raise.o \
signal.o \
time.o \
+ _sys_errlist.o \
all: syscall
$(MAKE) objs
diff --git a/src/libc/arch/arm64/rmode/.gitignore b/src/libc/arch/arm64/rmode/.gitignore
@@ -0,0 +1 @@
+_sys_errlist.c
diff --git a/src/libc/arch/arm64/rmode/Makefile b/src/libc/arch/arm64/rmode/Makefile
@@ -1,9 +1,11 @@
.POSIX:
PROJECTDIR =../../../../..
include $(PROJECTDIR)/scripts/rules.mk
+include ../../rules.mk
OBJS = _Exit.o \
raise.o \
_write.o \
-
+ _sys_errlist.o \
+
all: $(OBJS)
diff --git a/src/libc/arch/arm64/rmode/errno.lst b/src/libc/arch/arm64/rmode/errno.lst
@@ -0,0 +1,40 @@
+E2BIG 1 Argument list too long
+EACCES 2 Permission denied
+EAGAIN 3 Try again
+EBADF 4 Bad file number
+EBUSY 5 Device or resource busy
+ECHILD 6 No child processes
+EDEADLK 7 Resource deadlock would occur
+EEXIST 8 File exists
+EFAULT 9 Bad address
+EFBIG 10 File too large
+EINTR 11 Interrupted system call
+EINVAL 12 Invalid argument
+EIO 13 I/O error
+EISDIR 14 Is a directory
+EMFILE 15 Too many open files
+EMLINK 16 Too many links
+ENAMETOOLONG 17 File name too long
+ENFILE 18 File table overflow
+ENODEV 19 No such device
+ENOENT 20 No such file or directory
+ENOEXEC 21 Exec format error
+ENOLCK 22 No record locks available
+ENOMEM 23 Out of memory
+ENOSPC 24 No space left on device
+ENOSYS 25 Invalid system call number
+ENOTDIR 26 Not a directory
+ENOTEMPTY 27 Directory not empty
+ENOTTY 28 Not a typewriter
+ENXIO 29 No such device or address
+EPERM 30 Operation not permitted
+EPIPE 31 Broken pipe
+EROFS 32 Read-only file system
+ESPIPE 33 Illegal seek
+ESRCH 34 No such process
+EXDEV 35 Cross-device link
+ECANCELED 36 Operation Canceled
+EINPROGRESS 37 Operation now in progress
+ETXTBSY 38 Text file busy
+EDOM 39 Math argument out of domain of func
+ERANGE 40 Math result not representable