diff options
Diffstat (limited to 'kernel/drivers/ps2')
-rw-r--r-- | kernel/drivers/ps2/keyboard.c | 2 | ||||
-rw-r--r-- | kernel/drivers/ps2/mouse.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/kernel/drivers/ps2/keyboard.c b/kernel/drivers/ps2/keyboard.c index 616c539..be057d7 100644 --- a/kernel/drivers/ps2/keyboard.c +++ b/kernel/drivers/ps2/keyboard.c @@ -60,7 +60,7 @@ static res keyboard_read(void *buf, u32 offset, u32 count) static res keyboard_ready(void) { - return !stack_empty(queue); + return !stack_empty(queue) ? EOK : -EAGAIN; } CLEAR void ps2_keyboard_reset(void) diff --git a/kernel/drivers/ps2/mouse.c b/kernel/drivers/ps2/mouse.c index 1d3c1ae..ba6d338 100644 --- a/kernel/drivers/ps2/mouse.c +++ b/kernel/drivers/ps2/mouse.c @@ -45,6 +45,7 @@ static void mouse_handler(struct regs *r) event->but3 = (mouse_byte[0] >> 2) & 1; stack_push_bot(queue, event); mouse_cycle = 0; + io_unblock(IO_MOUSE); break; default: break; @@ -53,7 +54,7 @@ static void mouse_handler(struct regs *r) static res mouse_ready(void) { - return !stack_empty(queue); + return !stack_empty(queue) ? EOK : -EAGAIN; } static res mouse_read(void *buf, u32 offset, u32 count) |