diff options
author | grehan <grehan@FreeBSD.org> | 2008-02-06 22:04:28 +0000 |
---|---|---|
committer | grehan <grehan@FreeBSD.org> | 2008-02-06 22:04:28 +0000 |
commit | bd098ec7fe64704f5f6d681cfe7d3d723129b025 (patch) | |
tree | 4dfb3c007808bcd088810a00a77f3384577975f5 | |
parent | ddda03a2e0a13b1022f6a773716f0e4c34e380b0 (diff) | |
download | FreeBSD-src-bd098ec7fe64704f5f6d681cfe7d3d723129b025.zip FreeBSD-src-bd098ec7fe64704f5f6d681cfe7d3d723129b025.tar.gz |
Make the openfirmware getchar entry point non-blocking. This catches up
with jhb's 2005/05/27 loader multiple-console change.
Tested by: marius/sparc64, grehan/ofwppc
-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 796ac97..59ce9a5 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 |