From b99d66ce12b4a1a0dd452d8a38006eede0c05cf2 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 8 Aug 2022 00:45:46 +0200 Subject: kernel/backend: remove the kern.ready() method --- src/kernel/arch/amd64/driver/fsroot.c | 6 +----- src/kernel/arch/amd64/driver/ps2.c | 7 +------ src/kernel/arch/amd64/driver/serial.c | 7 +------ src/kernel/arch/amd64/driver/video.c | 7 +------ 4 files changed, 4 insertions(+), 23 deletions(-) (limited to 'src/kernel/arch/amd64') diff --git a/src/kernel/arch/amd64/driver/fsroot.c b/src/kernel/arch/amd64/driver/fsroot.c index 98880fe..ea9fa7d 100644 --- a/src/kernel/arch/amd64/driver/fsroot.c +++ b/src/kernel/arch/amd64/driver/fsroot.c @@ -91,9 +91,5 @@ static void accept(struct vfs_request *req) { } } -static bool is_ready(struct vfs_backend __attribute__((unused)) *self) { - return true; -} - -static struct vfs_backend backend = BACKEND_KERN(is_ready, accept); +static struct vfs_backend backend = BACKEND_KERN(accept); void vfs_root_init(void) { vfs_mount_root_register("", &backend); } diff --git a/src/kernel/arch/amd64/driver/ps2.c b/src/kernel/arch/amd64/driver/ps2.c index 1ddd27a..35165d9 100644 --- a/src/kernel/arch/amd64/driver/ps2.c +++ b/src/kernel/arch/amd64/driver/ps2.c @@ -16,11 +16,10 @@ static volatile uint8_t mouse_buf[64]; static volatile ring_t mouse_backlog = {(void*)mouse_buf, sizeof mouse_buf, 0, 0}; static void accept(struct vfs_request *req); -static bool is_ready(struct vfs_backend *self); static struct vfs_request *kb_queue = NULL; static struct vfs_request *mouse_queue = NULL; -static struct vfs_backend backend = BACKEND_KERN(is_ready, accept); +static struct vfs_backend backend = BACKEND_KERN(accept); static void wait_out(void) { uint8_t status; @@ -139,7 +138,3 @@ static void accept(struct vfs_request *req) { break; } } - -static bool is_ready(struct vfs_backend __attribute__((unused)) *self) { - return true; -} diff --git a/src/kernel/arch/amd64/driver/serial.c b/src/kernel/arch/amd64/driver/serial.c index 921e140..b3bfe29 100644 --- a/src/kernel/arch/amd64/driver/serial.c +++ b/src/kernel/arch/amd64/driver/serial.c @@ -12,10 +12,9 @@ static volatile ring_t backlog = {(void*)backlog_buf, sizeof backlog_buf, 0, 0}; static const int COM1 = 0x3f8; static void accept(struct vfs_request *req); -static bool is_ready(struct vfs_backend *self); static struct vfs_request *blocked_on = NULL; -static struct vfs_backend backend = BACKEND_KERN(is_ready, accept); +static struct vfs_backend backend = BACKEND_KERN(accept); void serial_init(void) { vfs_mount_root_register("/com1", &backend); } @@ -103,7 +102,3 @@ static void accept(struct vfs_request *req) { break; } } - -static bool is_ready(struct vfs_backend __attribute__((unused)) *self) { - return true; -} diff --git a/src/kernel/arch/amd64/driver/video.c b/src/kernel/arch/amd64/driver/video.c index d22adc4..ed4b971 100644 --- a/src/kernel/arch/amd64/driver/video.c +++ b/src/kernel/arch/amd64/driver/video.c @@ -64,12 +64,7 @@ static void accept(struct vfs_request *req) { } } -static bool is_ready(struct vfs_backend *self) { - (void)self; - return true; -} - -static struct vfs_backend backend = BACKEND_KERN(is_ready, accept); +static struct vfs_backend backend = BACKEND_KERN(accept); void video_init(struct fb_info fb_) { fb = fb_; snprintf(namebuf, sizeof namebuf, "%ux%ux%u", fb.width, fb.height, fb.bpp); -- cgit v1.2.3