Subject: Re: sysctl items defined at attach time
To: None <mouse@Holo.Rodents.Montreal.QC.CA, tech-kern@NetBSD.ORG>
From: Mike Hibler <>
List: tech-kern
Date: 08/29/1996 10:42:22
> Date: Thu, 29 Aug 1996 11:31:02 -0400
> From: der Mouse <mouse@Holo.Rodents.Montreal.QC.CA>
> To: tech-kern@NetBSD.ORG
> Subject: Re:  sysctl items defined at attach time
> ...
> This is really a reason for, as someone else suggested, putting sysctl
> into kernfs, so you can
> cat /kern/sysctl/tty/ttya/flow-type
> or
> echo rtscts > /kern/sysctl/tty/tty00/flow-type
> But then, I'm a wild-eyed dreamer. :-)  (One reason I really want to
> see sysctl moved into kernfs is that it eliminates one of the
> proliferating namespaces.  Used to be everything was a file - except
> processes, which had a different namespace (process IDs).  Then sockets
> came along and introduced another namespace.  And sysctl.  And shmids.
> And message queues...I'd really like to see these merged back into the
> filesystem namespace, if only so that chroot() can cut them off.  /proc
> moves processes back into the filesystem; kernfs has promise for moving
> sysctl there.
> 					der Mouse

Yeah, we fought this war back when Mike Karels added sysctl.  I was on your
side and favored just using /kern.  Mike on the other hand is, or at least
was, a firm believer that not everything should be made to look like a file.

The thrust of that view is that, for every useful, sensible example like
the one you cite above, there are 3-4 that are totally contrived or
non-sensical.  For example maybe I should be able to:

	mv /kern/tty/baud/9600/tty00 /kern/tty/baud/19200/tty00

to change the baud rate of my tty.

I guess I am an old fart now, but I kinda like ioctl.  No abstractions,
no illusions, it just gets the job done.