Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mac68k/dev Only the first device that we're sure is...
details: https://anonhg.NetBSD.org/src/rev/91275e8b6c44
branches: trunk
changeset: 488078:91275e8b6c44
user: scottr <scottr%NetBSD.org@localhost>
date: Sat Jun 17 17:46:40 2000 +0000
description:
Only the first device that we're sure is a keyboard should be attached
as the wskbd console device. (Part of the fix for PR 10086.)
diffstat:
sys/arch/mac68k/dev/akbd.c | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 deletions(-)
diffs (77 lines):
diff -r 98258fef2d8d -r 91275e8b6c44 sys/arch/mac68k/dev/akbd.c
--- a/sys/arch/mac68k/dev/akbd.c Sat Jun 17 17:40:32 2000 +0000
+++ b/sys/arch/mac68k/dev/akbd.c Sat Jun 17 17:46:40 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: akbd.c,v 1.7 2000/03/19 07:37:58 scottr Exp $ */
+/* $NetBSD: akbd.c,v 1.8 2000/06/17 17:46:40 scottr Exp $ */
/*
* Copyright (C) 1998 Colin Wood
@@ -141,6 +141,9 @@
u_char buffer[9];
#if NWSKBD > 0
struct wskbddev_attach_args a;
+ int wskbd_eligible;
+
+ wskbd_eligible = 1;
#endif
sc->origaddr = aa_args->origaddr;
@@ -175,10 +178,16 @@
printf("Mouseman (non-EMP) pseudo keyboard\n");
adbinfo.siServiceRtPtr = (Ptr)0;
adbinfo.siDataAreaAddr = (Ptr)0;
+#if NWSKBD > 0
+ wskbd_eligible = 0;
+#endif /* NWSKBD > 0 */
} else if (kbd_done && buffer[1] == 0x9a && buffer[2] == 0x21) {
printf("Trackman (non-EMP) pseudo keyboard\n");
adbinfo.siServiceRtPtr = (Ptr)0;
adbinfo.siDataAreaAddr = (Ptr)0;
+#if NWSKBD > 0
+ wskbd_eligible = 0;
+#endif /* NWSKBD > 0 */
} else {
printf("extended keyboard\n");
#ifdef notyet
@@ -206,6 +215,9 @@
break;
case ADB_ADJKPD:
printf("adjustable keypad\n");
+#if NWSKBD > 0
+ wskbd_eligible = 0;
+#endif /* NWSKBD > 0 */
break;
case ADB_ADJKBD:
printf("adjustable keyboard\n");
@@ -239,6 +251,9 @@
break;
default:
printf("mapped device (%d)\n", sc->handler_id);
+#if NWSKBD > 0
+ wskbd_eligible = 0;
+#endif /* NWSKBD > 0 */
break;
}
error = SetADBInfo(&adbinfo, sc->adbaddr);
@@ -248,7 +263,7 @@
#endif
#if NWSKBD > 0
- a.console = akbd_is_console();
+ a.console = wskbd_eligible && akbd_is_console();
a.keymap = &akbd_keymapdata;
a.accessops = &akbd_accessops;
a.accesscookie = sc;
@@ -456,8 +471,10 @@
akbd_is_console()
{
extern struct mac68k_machine_S mac68k_machine;
+ static int akbd_console_initted = 0;
- return ((mac68k_machine.serial_console & 0x03) == 0);
+ return ((mac68k_machine.serial_console & 0x03) == 0) &&
+ (++akbd_console_initted == 1);
}
int
Home |
Main Index |
Thread Index |
Old Index