mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-03 18:22:22 +00:00
Fixed everything to work with the new libc
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
int sys_read(intFrame_t* iframe) {
|
||||
char* s = (char*)iframe->ebx;
|
||||
reads(s);
|
||||
gets(s, 0xffffffff);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user