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/macppc/macppc Pull up revision 1.23 (requested...



details:   https://anonhg.NetBSD.org/src/rev/001fba6acea5
branches:  netbsd-1-5
changeset: 491046:001fba6acea5
user:      he <he%NetBSD.org@localhost>
date:      Sun Apr 01 16:59:35 2001 +0000

description:
Pull up revision 1.23 (requested by tsubai):
  Fix Keyboard problem of recent PowerBooks (Pismo, PowerBook G4,
  etc.).

diffstat:

 sys/arch/macppc/macppc/autoconf.c |  31 ++++++++++++++++++++++++++++++-
 1 files changed, 30 insertions(+), 1 deletions(-)

diffs (42 lines):

diff -r 0fdb5ab2e592 -r 001fba6acea5 sys/arch/macppc/macppc/autoconf.c
--- a/sys/arch/macppc/macppc/autoconf.c Sun Apr 01 16:59:18 2001 +0000
+++ b/sys/arch/macppc/macppc/autoconf.c Sun Apr 01 16:59:35 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.21.4.1 2000/11/01 16:25:19 tv Exp $     */
+/*     $NetBSD: autoconf.c,v 1.21.4.2 2001/04/01 16:59:35 he Exp $     */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -380,3 +380,32 @@
        }
        return 0;
 }
+
+int
+getnodebyname(start, target)
+       int start;
+       char *target;
+{
+       int node, next;
+       char name[64];
+
+       if (start == 0)
+               start = OF_peer(0);
+
+       for (node = start; node; node = next) {
+               bzero(name, sizeof name);
+               OF_getprop(node, "name", name, sizeof name - 1);
+               if (strcmp(name, target) == 0)
+                       break;
+
+               if ((next = OF_child(node)) != 0)
+                       continue;
+               while (node) {
+                       if ((next = OF_peer(node)) != 0)
+                               break;
+                       node = OF_parent(node);
+               }
+       }
+
+       return node;
+}



Home | Main Index | Thread Index | Old Index