Fixed everything to work with the new libc

This commit is contained in:
2024-10-26 14:40:18 +02:00
parent 21c59b28f7
commit 5d420b0d68
14 changed files with 43 additions and 27 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
int sys_read(intFrame_t* iframe) {
char* s = (char*)iframe->ebx;
reads(s);
gets(s, 0xffffffff);
return 0;
}
+2 -2
View File
@@ -4,7 +4,7 @@
#include <syscall.h>
// System call table
int (*syscalls[MAX_SYSCALLS])(intFrame_t*) = {
int (*syscalls[SYSCALL_COUNT])(intFrame_t*) = {
[SYS_EXIT] = sys_exit,
[SYS_READ] = sys_read,
[SYS_WRITE] = sys_write,
@@ -18,7 +18,7 @@ int (*syscalls[MAX_SYSCALLS])(intFrame_t*) = {
// Syscall handler
int syscallHandler(intFrame_t* iframe) {
if (iframe->eax > MAX_SYSCALLS-1) { // Syscall doesn't exist
if (iframe->eax > SYSCALL_COUNT-1) { // Syscall doesn't exist
debugf("Error: Syscall(%d) does not exist!\n", iframe->eax);
return -1;
}