Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/arch/mac68k/dev Pull up rev 1.11 from scottr:



details:   https://anonhg.NetBSD.org/src/rev/2c5af0724e6a
branches:  netbsd-1-5
changeset: 489530:2c5af0724e6a
user:      scottr <scottr%NetBSD.org@localhost>
date:      Fri Sep 22 11:37:54 2000 +0000

description:
Pull up rev 1.11 from scottr:
  Attach exactly one keyboard to the wscons console.

diffstat:

 sys/arch/mac68k/dev/akbd.c |  13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diffs (41 lines):

diff -r 0c06a45b7c1e -r 2c5af0724e6a sys/arch/mac68k/dev/akbd.c
--- a/sys/arch/mac68k/dev/akbd.c        Fri Sep 22 09:46:35 2000 +0000
+++ b/sys/arch/mac68k/dev/akbd.c        Fri Sep 22 11:37:54 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: akbd.c,v 1.9.2.1 2000/09/21 13:05:01 scottr Exp $      */
+/*     $NetBSD: akbd.c,v 1.9.2.2 2000/09/22 11:37:54 scottr Exp $      */
 
 /*
  * Copyright (C) 1998  Colin Wood
@@ -140,6 +140,7 @@
        u_char buffer[9];
 #if NWSKBD > 0
        struct wskbddev_attach_args a;
+       static int akbd_console_initted = 0;
        int wskbd_eligible;
 
        wskbd_eligible = 1;
@@ -256,7 +257,10 @@
 #endif
 
 #if NWSKBD > 0
-       a.console = wskbd_eligible && akbd_is_console();
+       if (akbd_is_console() && wskbd_eligible)
+               a.console = (++akbd_console_initted == 1);
+       else
+               a.console = 0;
        a.keymap = &akbd_keymapdata;
        a.accessops = &akbd_accessops;
        a.accesscookie = sc;
@@ -535,11 +539,6 @@
 int
 akbd_cnattach()
 {
-       static int akbd_console_initted = 0;
-
-       if ((++akbd_console_initted > 1) || !akbd_is_console())
-               return -1;
-
        wskbd_cnattach(&akbd_consops, NULL, &akbd_keymapdata);
 
        return 0;



Home | Main Index | Thread Index | Old Index