syscalls: faccessat

This commit is contained in:
Matheus
2023-07-05 00:02:18 -03:00
parent 2bb044ffe2
commit f31295460c
4 changed files with 86 additions and 7 deletions
+3 -1
View File
@@ -23,6 +23,7 @@ extern syscall_fcntl
extern syscall_chdir
extern syscall_pipe2
extern syscall_isatty
extern syscall_faccessat
syscalltab:
dq syscall_print
dq syscall_mmap
@@ -48,7 +49,8 @@ dq syscall_fcntl
dq syscall_chdir
dq syscall_pipe2
dq syscall_isatty
syscallcount equ 24
dq syscall_faccessat
syscallcount equ 25
section .text
global arch_syscall_entry
; on entry:
+4 -2
View File
@@ -2,7 +2,7 @@
#include <arch/e9.h>
#include <arch/cpu.h>
#define SYSCALL_COUNT 24
#define SYSCALL_COUNT 25
#define LOGSTR(x) arch_e9_puts(x)
static char *name[] = {
@@ -29,7 +29,8 @@ static char *name[] = {
"fcntl",
"chdir",
"pipe2",
"isatty"
"isatty",
"faccessat"
};
static char *args[] = {
@@ -57,6 +58,7 @@ static char *args[] = {
"path %s", // chdir
"flags %d", // pipe2
"fd %d", // isatty
"dirfd %d pathname %s mode %d flags %d" // faccessat
};
__attribute__((no_caller_saved_registers)) void arch_syscall_log(int syscall, uint64_t a1, uint64_t a2, uint64_t a3, uint64_t a4, uint64_t a5, uint64_t a6) {