Subject: Re: Adding port-dependant things to sysctl
To: Chris G. Demetriou <cgd@cs.cmu.edu>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: tech-kern
Date: 02/10/1997 22:20:35
> 
> > I'm wanting to add a mac68k-specific option to sysctl (a flag to let the
> > superuser turn on or off the ability of a break on the serial console
> > to drop us into the debugger).
> 
> So, last i heard, prevailing wisdom said that it was bad to add
> machine-dependent sysctls to individual systems which share a common
> ${MACHINE_ARCH}.  It sounds like your variable is probably
> machine-independent, but its use is not.

Indeed. It's use is decidedly mac68k, though it could be broadened
(but that's not the point for now :-)

> I don't know the right solution, but do want to keep you from going
> down the wrong path...  8-)

Much apreciated.

> So, the kernel doesn't export anything, in the dynamic sense.
> 
> All knowledge of the sysctl "MIB" is hard-coded into the sysctl
> program and function call at compile time.
>
> I, for one, think that the current implementation is ... rather
> broken.  I've some ideas on how to fix it, but they change the sysctl
> implementation dramatically.  If anybody would like to discuss them,
> with an eye towards fleshing them out and actually implementing them,
> get in touch with me privately.

I agree. I'd really prefer to use kernfs, and to have a /kern/machdep
directory with whatever the port wants. But kernfs would need to be
able to handle multiple directories. I didn't stare at it long-enough
last time to make it work.

Buit I was hoping to use sysctl as a quick hack. Looks like I can't.

Take care,

Bill