From owner-freebsd-hackers Fri Sep 8 12:47:43 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.osd.bsdi.com (mass.osd.bsdi.com [204.216.28.234]) by hub.freebsd.org (Postfix) with ESMTP id 73FDB37B42C for ; Fri, 8 Sep 2000 12:47:41 -0700 (PDT) Received: from mass.osd.bsdi.com (localhost [127.0.0.1]) by mass.osd.bsdi.com (8.9.3/8.9.3) with ESMTP id NAA00899; Fri, 8 Sep 2000 13:00:26 -0700 (PDT) (envelope-from msmith@mass.osd.bsdi.com) Message-Id: <200009082000.NAA00899@mass.osd.bsdi.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: Nicolai Petri Cc: hackers@freebsd.org Subject: Re: Creating a list of newbus devices. In-reply-to: Your message of "Fri, 08 Sep 2000 13:01:23 +0200." <200009081101.NAA38560@distortion.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 08 Sep 2000 13:00:26 -0700 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Is it possible from kernel mode to create a list of newbus devices ? And > how do I'll get a pointer to the new-bus root (or whatever it's tecnical > name is :) extern devclass_t nexus_devclass; nexus = devclass_get_device(nexus_devclass, 0); static void device_enumerate_children(device_t dev) { device_t *devp; int ndevs, i; if (device_get_children(dev, &devp, &ndevs) || (ndevs == 0)) return; for (i = 0; i < ndevs; i++, devp++) device_enumerate_children(*devp); } -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message