diff options
author | Marvin Borner | 2020-05-02 15:44:11 +0200 |
---|---|---|
committer | Marvin Borner | 2020-05-02 15:44:11 +0200 |
commit | aa8a8811818331cf511681327e3ba95e456f0d33 (patch) | |
tree | 852c314dae76e756863f94639ff45eff72834d5d /src/kernel/graphics/vesa.c | |
parent | 2a0e810a473dea57fd1cd53ea424b61269c029ba (diff) |
Added many syscalls to get better POSIX compliance
Diffstat (limited to 'src/kernel/graphics/vesa.c')
-rw-r--r-- | src/kernel/graphics/vesa.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/kernel/graphics/vesa.c b/src/kernel/graphics/vesa.c index 8213c12..c6c828b 100644 --- a/src/kernel/graphics/vesa.c +++ b/src/kernel/graphics/vesa.c @@ -5,6 +5,8 @@ #include <kernel/lib/stdio.h> #include <kernel/memory/alloc.h> #include <kernel/memory/paging.h> +#include <kernel/fs/dev.h> +#include <kernel/fs/ext2.h> void vbe_error() { @@ -81,6 +83,12 @@ struct vbe_mode_info *vbe_get_mode_info(uint16_t mode) return ret; } +uint32_t fb_write(struct fs_node *node, uint32_t offset, uint32_t size, uint8_t *buffer) +{ + log("FB WRITE!"); + return 0; +} + void set_optimal_resolution() { log("Switching to graphics mode"); @@ -170,6 +178,12 @@ void set_optimal_resolution() paging_map_user(paging_root_directory, (uint32_t)fb + z, (uint32_t)fb + z); } + dev_make("fb", NULL, (write)fb_write); + struct fs_node *node = (struct fs_node *)kmalloc(sizeof(struct fs_node)); + strcpy(node->name, "/dev/fb"); + ext2_root->open(node); + node->dev->block_size = 0; + if (vbe_height > 1440) vesa_set_font(32); else if (vbe_height > 720) |