mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
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 <Jamey.Wood@Sun.COM> and myself Submitted by: tmm (2)
This commit is contained in:
parent
48cff2ea0b
commit
cbecdd5743
1 changed files with 2 additions and 2 deletions
|
|
@ -39,7 +39,7 @@ static const char rcsid[] =
|
|||
|
||||
#include <dev/ofw/openfirm.h>
|
||||
|
||||
#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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue