Remove fbdev, add term_getsizes() syscall to get terminal width+height
This commit is contained in:
@ -5,7 +5,6 @@
|
||||
#include "dev/dev.h"
|
||||
#include "dev/ps2kbdev.h"
|
||||
#include "dev/serialdev.h"
|
||||
#include "dev/fbdev.h"
|
||||
#include "hshtb.h"
|
||||
|
||||
DevTable DEVTABLE;
|
||||
@ -16,5 +15,4 @@ void dev_init(void) {
|
||||
|
||||
ps2kbdev_init();
|
||||
serialdev_init();
|
||||
fbdev_init();
|
||||
}
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "dev/fbdev.h"
|
||||
#include "dev/dev.h"
|
||||
#include "sysdefs/dev.h"
|
||||
#include "spinlock/spinlock.h"
|
||||
#include "util/util.h"
|
||||
#include "bootinfo/bootinfo.h"
|
||||
#include "std/string.h"
|
||||
#include "errors.h"
|
||||
#include "hshtb.h"
|
||||
|
||||
int32_t fbdev_getinfo(struct Dev *dev, uint8_t *buffer, size_t len, uint64_t pid) {
|
||||
(void)dev; (void)pid;
|
||||
|
||||
if (len != sizeof(FbDevGetInfo)) {
|
||||
return E_INVALIDARGUMENT;
|
||||
}
|
||||
|
||||
FbDevGetInfo info = {
|
||||
.w = BOOT_INFO.fb->width,
|
||||
.h = BOOT_INFO.fb->height,
|
||||
.margin = 20,
|
||||
.fontw = 8,
|
||||
.fonth = 16,
|
||||
};
|
||||
memcpy(buffer, &info, sizeof(info));
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
void fbdev_init(void) {
|
||||
Dev *fbdev;
|
||||
HSHTB_ALLOC(DEVTABLE.devs, ident, "fbdev", fbdev);
|
||||
fbdev->fns[DEV_FBDEV_GETINFO] = &fbdev_getinfo;
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
#ifndef DEV_FBDEV_H_
|
||||
#define DEV_FBDEV_H_
|
||||
|
||||
void fbdev_init(void);
|
||||
|
||||
#endif // DEV_FBDEV_H_
|
||||
Reference in New Issue
Block a user