mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-02 07:28:21 +00:00
fb: fix seek
This commit is contained in:
+11
-1
@@ -76,6 +76,15 @@ static struct limine_framebuffer **fbs;
|
||||
static fixinfo_t *fixinfos;
|
||||
static varinfo_t *varinfos;
|
||||
|
||||
static int maxseek(int minor, size_t *max) {
|
||||
if (minor >= count)
|
||||
return ENODEV;
|
||||
|
||||
*max = fbs[minor]->pitch * fbs[minor]->height;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int read(int minor, void *buffer, size_t size, uintmax_t offset, int flags, size_t *readc) {
|
||||
if (minor >= count)
|
||||
return ENODEV;
|
||||
@@ -182,7 +191,8 @@ static devops_t ops = {
|
||||
.write = write,
|
||||
.mmap = mmap,
|
||||
.munmap = munmap,
|
||||
.ioctl = ioctl
|
||||
.ioctl = ioctl,
|
||||
.maxseek = maxseek
|
||||
};
|
||||
|
||||
void fb_init() {
|
||||
|
||||
Reference in New Issue
Block a user