From 5fbb5241c743324645dacdf2288d7b6909cbee27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 16 Feb 2007 06:30:36 +0000 Subject: [PATCH] Fixed endless loop in the legacy keyboard driver (currently only used by consoled). This actually fixes bug #1024. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20140 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/drivers/arch/x86/keyboard/keyboard.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/add-ons/kernel/drivers/arch/x86/keyboard/keyboard.c b/src/add-ons/kernel/drivers/arch/x86/keyboard/keyboard.c index 4c2aa526d4..b124381438 100644 --- a/src/add-ons/kernel/drivers/arch/x86/keyboard/keyboard.c +++ b/src/add-ons/kernel/drivers/arch/x86/keyboard/keyboard.c @@ -1,7 +1,7 @@ /* -** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. -** Distributed under the terms of the NewOS License. -*/ + * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. + * Distributed under the terms of the NewOS License. + */ #include @@ -250,7 +250,7 @@ handle_keyboard_interrupt(void *data) } -// #pragma mark - +// #pragma mark - device hooks static status_t @@ -333,6 +333,8 @@ retry: *_length = 0; return B_OK; } + if (status < B_OK) + return status; // critical section mutex_lock(&keyboard_read_mutex); @@ -403,8 +405,7 @@ device_hooks keyboard_hooks = { }; -// #pragma mark - -/***** driver hooks *****/ +// #pragma mark - driver hooks status_t