From owner-freebsd-hackers Fri Sep 8 9:28:39 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 695AD37B43E for ; Fri, 8 Sep 2000 09:28:36 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id KAA43366; Fri, 8 Sep 2000 10:28:34 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id KAA55850; Fri, 8 Sep 2000 10:28:22 -0600 (MDT) Message-Id: <200009081628.KAA55850@harmony.village.org> To: Nicolai Petri Subject: Re: Creating a list of newbus devices. Cc: hackers@FreeBSD.ORG In-reply-to: Your message of "Fri, 08 Sep 2000 13:01:23 +0200." <200009081101.NAA38560@distortion.dk> References: <200009081101.NAA38560@distortion.dk> Date: Fri, 08 Sep 2000 10:28:22 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <200009081101.NAA38560@distortion.dk> Nicolai Petri writes: : 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 :) Yes. You keep asking for parents until you get none. The one that has a null parent is the nexus. You can then walk the tree from there. See kern/subr_bus.c for the routines to do this, and read the assocaited man pages. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message