diff options
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/ofw/libofw/ofw_console.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/boot/ofw/libofw/ofw_console.c b/sys/boot/ofw/libofw/ofw_console.c index 796ac974dce0..59ce9a5067d5 100644 --- a/sys/boot/ofw/libofw/ofw_console.c +++ b/sys/boot/ofw/libofw/ofw_console.c @@ -97,10 +97,10 @@ ofw_cons_getchar() return l; } - while ((l = OF_read(stdin, &ch, 1)) != 1) - if (l != -2 && l != 0) - return -1; - return ch; + if (OF_read(stdin, &ch, 1) > 0) + return (ch); + + return (-1); } int |