syscalls: isatty

This commit is contained in:
Matheus
2023-07-04 20:19:15 -03:00
parent 51446cdd37
commit 04a5aa4bc6
8 changed files with 59 additions and 11 deletions
+3 -1
View File
@@ -22,6 +22,7 @@ extern syscall_dup3
extern syscall_fcntl
extern syscall_chdir
extern syscall_pipe2
extern syscall_isatty
syscalltab:
dq syscall_print
dq syscall_mmap
@@ -46,7 +47,8 @@ dq syscall_dup3
dq syscall_fcntl
dq syscall_chdir
dq syscall_pipe2
syscallcount equ 23
dq syscall_isatty
syscallcount equ 24
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 23
#define SYSCALL_COUNT 24
#define LOGSTR(x) arch_e9_puts(x)
static char *name[] = {
@@ -28,7 +28,8 @@ static char *name[] = {
"dup3",
"fcntl",
"chdir",
"pipe2"
"pipe2",
"isatty"
};
static char *args[] = {
@@ -55,6 +56,7 @@ static char *args[] = {
"fd %d cmd %d arg %lu", // fcntl
"path %s", // chdir
"flags %d", // pipe2
"fd %d", // isatty
};
__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) {