shithub: scc

Download patch

ref: bc8e04323b76bf135995d22ecacf9a3cf987901c
parent: 82985457cab187b4e4b2f6706cdea31a2f3fa879
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Wed May 18 14:37:27 EDT 2022

libc/linux: Add _access() syscall

--- a/src/libc/arch/amd64/linux/.gitignore
+++ b/src/libc/arch/amd64/linux/.gitignore
@@ -1,4 +1,5 @@
 __sigaction.s
+_access.s
 _close.s
 _exit.s
 _execve.s
--- a/src/libc/arch/amd64/linux/Makefile
+++ b/src/libc/arch/amd64/linux/Makefile
@@ -6,6 +6,7 @@
 include ../../../rules.mk
 
 GENOBJS =\
+	_access.$O\
 	__sigaction.$O\
 	_close.$O\
 	_execve.$O\
--- a/src/libc/arch/amd64/linux/syscall.lst
+++ b/src/libc/arch/amd64/linux/syscall.lst
@@ -8,6 +8,7 @@
 12	_sys_brk	1
 13	__sigaction	4
 15	_sigreturn	0
+21	_access	2
 39	_getpid	0
 57	_fork	0
 59	_execve	3
--- a/src/libc/arch/arm/linux/.gitignore
+++ b/src/libc/arch/arm/linux/.gitignore
@@ -1,4 +1,5 @@
-_Exit.s
+_access.s
+_exit.s
 _brk.s
 _close.s
 _fork.s
--- a/src/libc/arch/arm/linux/Makefile
+++ b/src/libc/arch/arm/linux/Makefile
@@ -5,6 +5,7 @@
 include ../../../rules.mk
 
 GENOBJS =\
+	_access.$O\
 	_close.$O\
 	_execve.$O\
 	_exit.$O\
--- a/src/libc/arch/arm/linux/syscall.lst
+++ b/src/libc/arch/arm/linux/syscall.lst
@@ -7,6 +7,7 @@
 11	_execve
 19	_lseek
 20	_getpid
+33	_access
 37	_kill
 45	_sys_brk
 114	_wait4
--- a/src/libc/arch/arm64/linux/.gitignore
+++ b/src/libc/arch/arm64/linux/.gitignore
@@ -1,4 +1,4 @@
-_Exit.s
+_exit.s
 _brk.s
 _close.s
 _getpid.s
--- a/src/libc/arch/i386/linux/.gitignore
+++ b/src/libc/arch/i386/linux/.gitignore
@@ -1,3 +1,4 @@
+_access.s
 _close.s
 _exit.s
 _fork.s
--- a/src/libc/arch/i386/linux/Makefile
+++ b/src/libc/arch/i386/linux/Makefile
@@ -5,6 +5,7 @@
 include ../../../rules.mk
 
 GENOBJS =\
+	_access.$O\
 	_close.$O\
 	_execve.$O\
 	_exit.$O\
--- a/src/libc/arch/i386/linux/syscall.lst
+++ b/src/libc/arch/i386/linux/syscall.lst
@@ -9,6 +9,7 @@
 11	_execve	11
 19	_lseek	3
 20	_getpid	0
+33	_access	2
 37	_kill	2
 45	_sys_brk	1
 67	__sigaction	4
--- a/src/libc/arch/ppc/linux/.gitignore
+++ b/src/libc/arch/ppc/linux/.gitignore
@@ -1,3 +1,4 @@
+_access.s
 _close.s
 _creat.s
 _exit.s
--- a/src/libc/arch/ppc/linux/Makefile
+++ b/src/libc/arch/ppc/linux/Makefile
@@ -7,6 +7,7 @@
 include ../../../rules.mk
 
 GENOBJS =\
+	_access.$O\
 	_close.$O\
 	_creat.$O\
 	_execve.$O\
--- a/src/libc/arch/ppc/linux/syscall.lst
+++ b/src/libc/arch/ppc/linux/syscall.lst
@@ -10,6 +10,7 @@
 10	_unlink
 11	_execve
 20	_getpid
+33	_access
 37	_kill
 45	_sys_brk
 114	_wait4
--- a/src/libc/objs/amd64-linux.mk
+++ b/src/libc/objs/amd64-linux.mk
@@ -3,6 +3,7 @@
 OBJS =\
 	$(COMMON_OBJS)\
 	arch/amd64/linux/__sigaction.$O\
+	arch/amd64/linux/_access.$O\
 	arch/amd64/linux/_cerrno.$O\
 	arch/amd64/linux/_close.$O\
 	arch/amd64/linux/_execve.$O\