Date: Fri, 08 Sep 2000 13:00:26 -0700 From: Mike Smith <msmith@freebsd.org> To: Nicolai Petri <npp@distortion.dk> Cc: hackers@freebsd.org Subject: Re: Creating a list of newbus devices. Message-ID: <200009082000.NAA00899@mass.osd.bsdi.com> In-Reply-To: Your message of "Fri, 08 Sep 2000 13:01:23 %2B0200." <200009081101.NAA38560@distortion.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009082000.NAA00899>