Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc64/dev If the zs has not yet attached use the ...



details:   https://anonhg.NetBSD.org/src/rev/647e714f0188
branches:  trunk
changeset: 473158:647e714f0188
user:      eeh <eeh%NetBSD.org@localhost>
date:      Sat May 22 20:34:56 1999 +0000

description:
If the zs has not yet attached use the PROM for console input.

diffstat:

 sys/arch/sparc64/dev/kd.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (25 lines):

diff -r c6ca2be896ef -r 647e714f0188 sys/arch/sparc64/dev/kd.c
--- a/sys/arch/sparc64/dev/kd.c Sat May 22 20:33:55 1999 +0000
+++ b/sys/arch/sparc64/dev/kd.c Sat May 22 20:34:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kd.c,v 1.2 1999/04/25 16:16:31 eeh Exp $       */
+/*     $NetBSD: kd.c,v 1.3 1999/05/22 20:34:56 eeh Exp $       */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -518,8 +518,13 @@
        int code, class, data, keysym;
 
        if (!zs_conschan) {
-               /* Not initialized yet */
-               return -1;
+               char c0;
+
+               while ((code = OF_read(OF_stdin(), &c0, sizeof(c0))) != sizeof(c0)) {
+                       if (code != -2 && code != 0)
+                               return -1;
+               }
+               return (c0);
        } else {
                for (;;) {
                        code = zs_getc(zs_conschan);



Home | Main Index | Thread Index | Old Index