When looking for a console keyboard if usb-kbd-ihandles can't be found

then try the old name usb-kbd-ihandle.  This way my old iMac gets the
USB keyboard as console instead on the (non-existent) ADB keyboard.
Suggested by Gabriel Rosenkoetter.
This commit is contained in:
augustss 2001-12-10 02:46:05 +00:00
parent 0b63bf16b8
commit 01b4e2c572

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.106 2001/12/05 05:02:11 chs Exp $ */
/* $NetBSD: machdep.c,v 1.107 2001/12/10 02:46:05 augustss Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -952,18 +952,25 @@ cninit_kd()
if (OF_call_method("`usb-kbd-ihandles", stdin, 0, 1, &ukbds) != -1 &&
ukbds != NULL && ukbds->ihandle != 0 &&
OF_instance_to_package(ukbds->ihandle) != -1) {
printf("console keyboard type: USB\n");
ukbd_cnattach();
goto kbd_found;
}
/* Try old method name. */
if (OF_call_method("`usb-kbd-ihandle", stdin, 0, 1, &akbd) != -1 &&
akbd != 0 &&
OF_instance_to_package(akbd) != -1) {
printf("console keyboard type: USB\n");
stdin = akbd;
ukbd_cnattach();
goto kbd_found;
}
#endif
#if NAKBD > 0
if (OF_call_method("`adb-kbd-ihandle", stdin, 0, 1, &akbd) != -1 &&
akbd != 0 &&
OF_instance_to_package(akbd) != -1) {
printf("console keyboard type: ADB\n");
stdin = akbd;
akbd_cnattach();