diff options
author | Peter Grehan <grehan@FreeBSD.org> | 2008-02-06 22:04:28 +0000 |
---|---|---|
committer | Peter Grehan <grehan@FreeBSD.org> | 2008-02-06 22:04:28 +0000 |
commit | e45efebc972534a444463f6f3ad30a6e20c7c3c6 (patch) | |
tree | 4dfb3c007808bcd088810a00a77f3384577975f5 /sys/boot | |
parent | 47252f4e65a64cfcde317ef4e990330924f36d32 (diff) | |
download | src-e45efebc972534a444463f6f3ad30a6e20c7c3c6.tar.gz src-e45efebc972534a444463f6f3ad30a6e20c7c3c6.zip |
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
Notes
Notes:
svn path=/head/; revision=176068
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 |