From 4546c75d685475d8b9f215b588364e1d1bbd0b79 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 29 Apr 2020 19:21:29 +0200 Subject: MUCH work in libc Also cleaned up some syscalls etc --- src/kernel/syscall/actions/sys_getch.c | 11 ----------- src/kernel/syscall/actions/sys_pointers.c | 11 +---------- src/kernel/syscall/actions/sys_scancode.c | 11 +++++++++++ 3 files changed, 12 insertions(+), 21 deletions(-) delete mode 100644 src/kernel/syscall/actions/sys_getch.c create mode 100644 src/kernel/syscall/actions/sys_scancode.c (limited to 'src/kernel/syscall/actions') diff --git a/src/kernel/syscall/actions/sys_getch.c b/src/kernel/syscall/actions/sys_getch.c deleted file mode 100644 index 3ce1f8c..0000000 --- a/src/kernel/syscall/actions/sys_getch.c +++ /dev/null @@ -1,11 +0,0 @@ -#include -#include -#include - -uint32_t sys_getch() -{ - sti(); - uint32_t key = getch(); - cli(); - return key; -} \ No newline at end of file diff --git a/src/kernel/syscall/actions/sys_pointers.c b/src/kernel/syscall/actions/sys_pointers.c index ced95de..6cf50ae 100644 --- a/src/kernel/syscall/actions/sys_pointers.c +++ b/src/kernel/syscall/actions/sys_pointers.c @@ -12,17 +12,8 @@ struct pointers { uint32_t sys_pointers() { - struct vbe_mode_info *ret = (struct vbe_mode_info *)umalloc(sizeof(struct vbe_mode_info)); - ret->attributes = current_mode_info->attributes; - ret->pitch = current_mode_info->pitch; - ret->width = current_mode_info->width; - ret->height = current_mode_info->height; - ret->bpp = current_mode_info->bpp; - ret->memory_model = current_mode_info->memory_model; - ret->framebuffer = current_mode_info->framebuffer; - struct pointers *pointers = umalloc(sizeof(struct pointers)); - pointers->current_mode_info = ret; + pointers->current_mode_info = current_mode_info; pointers->font = font; return pointers; diff --git a/src/kernel/syscall/actions/sys_scancode.c b/src/kernel/syscall/actions/sys_scancode.c new file mode 100644 index 0000000..612326a --- /dev/null +++ b/src/kernel/syscall/actions/sys_scancode.c @@ -0,0 +1,11 @@ +#include +#include +#include + +uint32_t sys_scancode() +{ + sti(); + uint32_t key = wait_scancode(); + cli(); + return key; +} \ No newline at end of file -- cgit v1.2.3