Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/arch/macppc/dev pullup 1.6->1.7 (thorpej)



details:   https://anonhg.NetBSD.org/src/rev/9787fe88c46d
branches:  netbsd-1-4
changeset: 468686:9787fe88c46d
user:      perry <perry%NetBSD.org@localhost>
date:      Thu May 06 19:42:17 1999 +0000

description:
pullup 1.6->1.7 (thorpej)

diffstat:

 sys/arch/macppc/dev/akbd.c |  42 ++++--------------------------------------
 1 files changed, 4 insertions(+), 38 deletions(-)

diffs (79 lines):

diff -r 838c1180b902 -r 9787fe88c46d sys/arch/macppc/dev/akbd.c
--- a/sys/arch/macppc/dev/akbd.c        Thu May 06 19:41:25 1999 +0000
+++ b/sys/arch/macppc/dev/akbd.c        Thu May 06 19:42:17 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: akbd.c,v 1.6 1999/02/17 14:56:56 tsubai Exp $  */
+/*     $NetBSD: akbd.c,v 1.6.2.1 1999/05/06 19:42:17 perry Exp $       */
 
 /*
  * Copyright (C) 1998  Colin Wood
@@ -104,7 +104,7 @@
        KB_US,
 };
 
-static int akbd_is_console __P((void));
+static int akbd_is_console;
 
 static int
 akbdmatch(parent, cf, aux)
@@ -237,7 +237,7 @@
                printf("kbd: returned %d from SetADBInfo\n", error);
 #endif
 
-       a.console = akbd_is_console();
+       a.console = akbd_is_console;
        a.keymap = &akbd_keymapdata;
        a.accessops = &akbd_accessops;
        a.accesscookie = sc;
@@ -436,24 +436,6 @@
 #endif
 
 int
-akbd_is_console()
-{
-       int chosen, stdin, pkg;
-       char name[16];
-       int kbd;
-
-       chosen = OF_finddevice("/chosen");
-       OF_getprop(chosen, "stdin", &stdin, 4);
-       pkg = OF_instance_to_package(stdin);
-       OF_getprop(pkg, "name", name, sizeof(name));
-
-       if (strcmp(name, "keyboard") == 0)
-               return 1;
-       else
-               return 0;
-}
-
-int
 akbd_enable(v, on)
        void *v;
        int on;
@@ -527,25 +509,9 @@
 int
 akbd_cnattach()
 {
-       int chosen, stdin, node;
-       char name[16];
 
-       chosen = OF_finddevice("/chosen");
-       if (chosen == -1)
-               return -1;
-
-       if (OF_getprop(chosen, "stdin", &stdin, sizeof(stdin)) == -1)
-               return -1;
-
-       node = OF_parent(OF_instance_to_package(stdin));
-       bzero(name, sizeof(name));
-       OF_getprop(node, "name", name, sizeof(name));
-
-       if (strcmp(name, "adb") != 0)
-               return -1;
-
+       akbd_is_console = 1;
        wskbd_cnattach(&akbd_consops, NULL, &akbd_keymapdata);
-
        return 0;
 }
 



Home | Main Index | Thread Index | Old Index