From 92281a084f3bc55a4b238d86776497b8598f26f8 Mon Sep 17 00:00:00 2001 From: jake Date: Tue, 1 Jan 2002 21:45:30 +0000 Subject: 1. Lower the poll timeout for the ofw console driver from hz / 50 to hz / 4. This gives a bit of a sluggish console, but it prevents the console from getting stuck if we poll too fast, as well as other badness on certain machines. 2. Fix a test for != 0 that should have been > 0. Noticed by: Jamey Wood and myself Submitted by: tmm (2) --- sys/dev/ofw/ofw_console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/ofw') diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c index 282a442..fef7d84 100644 --- a/sys/dev/ofw/ofw_console.c +++ b/sys/dev/ofw/ofw_console.c @@ -39,7 +39,7 @@ static const char rcsid[] = #include -#define OFW_POLL_HZ 50 +#define OFW_POLL_HZ 4 static d_open_t ofw_dev_open; static d_close_t ofw_dev_close; @@ -286,7 +286,7 @@ ofw_cons_checkc(dev_t dev) { unsigned char ch; - if (OF_read(stdin, &ch, 1) != 0) { + if (OF_read(stdin, &ch, 1) > 0) { return (ch); } -- cgit v1.1