Break ioctl() up into smaller syscalls

This commit is contained in:
2025-10-14 20:05:41 +02:00
parent c34a253d11
commit 406434fed0
21 changed files with 375 additions and 320 deletions

View File

@ -3,7 +3,6 @@
#include "errors.h"
#include "kprintf.h"
#include "sysdefs/syscall.h"
#include "ioctl.h"
#include "ipcpipe.h"
#include "mman.h"
#include "sched.h"
@ -11,6 +10,7 @@
#include "randcrypto.h"
#include "vfs.h"
#include "proc.h"
#include "fs.h"
int32_t SYSCALL1(sys_debugprint, string) {
char *p = (char *)string;
@ -20,7 +20,6 @@ int32_t SYSCALL1(sys_debugprint, string) {
SyscallFn SYSCALL_TABLE[SYSCALLS_MAX] = {
[SYS_DEBUGPRINT] = &sys_debugprint,
[SYS_IOCTL] = &sys_ioctl,
[SYS_MMAN_MAP] = &sys_mman_map,
[SYS_MMAN_UNMAP] = &sys_mman_unmap,
[SYS_SCHEDRELEASE] = &sys_schedrelease,
@ -42,4 +41,11 @@ SyscallFn SYSCALL_TABLE[SYSCALLS_MAX] = {
[SYS_PROC_ARGV] = &sys_proc_argv,
[SYS_PROC_LISTSIZE] = &sys_proc_listsize,
[SYS_PROC_STAT] = &sys_proc_stat,
[SYS_FS_OPENF] = &sys_fs_openf,
[SYS_FS_CLOSEF] = &sys_fs_closef,
[SYS_FS_READ] = &sys_fs_read,
[SYS_FS_WRITE] = &sys_fs_write,
[SYS_FS_STAT] = &sys_fs_stat,
[SYS_FS_FETCHDIRENT] = &sys_fs_fetchdirent,
[SYS_FS_MKDIR] = &sys_fs_mkdir,
};