working on exposing vga to userspace

This commit is contained in:
2026-07-16 14:44:08 -05:00
parent 37aa46c847
commit b588634253
16 changed files with 251 additions and 139 deletions

View File

@@ -1,18 +1,22 @@
#include "drivers/serial/serial.h"
#include "vfs.h"
#include <lib/font.h>
#include <lib/memory.h>
#include <lib/print.h>
#include <stddef.h>
psf_font_t* load_font(const char* path) {
int fd = vfs_open(path, 0);
if (fd == -1) {
kprintf("failed to open font file %s\n", path);
return NULL;
}
psf_hdr_t* header = kalloc(sizeof(psf_hdr_t));
int rd = vfs_read(fd, header, sizeof(psf_hdr_t));
if (rd <= 0) {
kprintf("failed to read font header\n");
kfree(header);
return NULL;
}