Subject: Re: print configuration utility?
To: Andrew Gillham <>
From: Brett Lymn <>
List: current-users
Date: 09/30/1996 17:39:04
According to Andrew Gillham:
>Ron Roskens wrote:
>> The current auto-configurable kernels seem to store all device
>> information in a queue. If you iterate over this queue, you know
>> all the devices configured on the system. With a little programming
>> you could come up with a "print configuration" command.

Yes indeedy - this one did go around tech-kern (if I remember
correctly) for a while.  The last I heard someone was going to add the
necessary bits to the kernel so that we can snarf the information out
of the kernel.  I do have something hacked together that walks the
kernel device tree and can tell you some things but it is very hackish
because it has knowledge about private driver structures hard coded
into it - very very very bad.  I am waiting for the "right" way to be
implemented before doing the prtconf thang

>This might be _very_ useful for installation.  It would make figuring
>out what installation devices are available much easier!  No need to
>sort through dmesg output looking for drives.  If the command had the
>ability to return only a specific set of devices (based on an argument)
>that might also be very useful.  You would be able to ask for all devices
>of type 'disk', or 'net', or 'cdrom', all from a shell script!  Of course
>it would be useful for the script I posted too.

You can do this bit already - the device type is available (dunno if
it tells you the diff between cdrom and disk, will have to check) in
the device structures.  It is when you want more info on the
controllers, like i/o address and so on, that you get into trouble.

Brett Lymn, Computer Systems Administrator, AWA Defence Industries
  "Upgrading your memory gives you MORE RAM!" - ad in MacWAREHOUSE catalogue.