Kernel/LibC: move file offset back to kernel

This makes keeping track of offsets easier and more proper
This commit is contained in:
2023-05-16 14:14:47 +03:00
parent f33e78882e
commit 4a4a3bf184
10 changed files with 142 additions and 58 deletions

View File

@@ -76,6 +76,20 @@ long syscall(long syscall, ...)
ret = Kernel::syscall(SYS_FREE, (uintptr_t)ptr);
break;
}
case SYS_SEEK:
{
int fd = va_arg(args, int);
off_t offset = va_arg(args, off_t);
int whence = va_arg(args, int);
ret = Kernel::syscall(SYS_SEEK, fd, offset, whence);
break;
}
case SYS_TELL:
{
int fd = va_arg(args, int);
ret = Kernel::syscall(SYS_TELL, fd);
break;
}
default:
puts("LibC: Unhandeled syscall");
ret = -ENOSYS;