Subject: Re: testing presence of a device (was sun-lamp CVS commits)
To: Tom Pavel <>
From: Chris G Demetriou <Chris_G_Demetriou@BALVENIE.PDL.CS.CMU.EDU>
List: current-users
Date: 10/07/1995 16:42:28
> I had been thinking about an interface for getting device info also,
> but within the context of KERNFS.  Now, I know that kernfs is
> currently something of a toy and that sysctl() has the advantage that
> it's there in all kernels regardless of config options.  But, on the
> other hand, kernfs is rather cheap (it only adds 4k of code to my
> i386 kernel when I compile it in or not), and one could certainly
> arrange to compile it into the INSTALL kernel.

don't forget that you also would then need the kernfs mount
program, etc.

> But, I hadn't thought about adding a directory structure under /kern
> that reflects the device/bus structure of the system.  For example:
> 	/kern/dev/isa/aha0/id0  [etc.]

a nitpick: that _really_ should be isa0.  multiple ISA busses aren't
as improbable as you might think.

To my mind, one should be able to access a mostly-identical set of
things via sysctl and kernfs.  I (still) see kernfs as a "neat example
of something strange you can do in a file system," and not something
to be used day-to-day.