Subject: Re: TTY virtualization driver
To: None <>
From: Greg A. Woods <>
List: tech-kern
Date: 01/24/2002 17:55:36
[ On Thursday, January 24, 2002 at 16:43:46 (-0500), der Mouse wrote: ]
> Subject: Re: TTY virtualization driver
> And you can do that today, with no kernel changes, by locking down all
> tty device attachments in your kernel config (which you'll need to do
> anyway) and then using ln, ln -s, and/or mv in /dev.

No, I don't have that today -- I have many device major numbers for all
things TTY-like, not one.

If I pull out a cyclades card and plug in a lava card I've got to do any
number of renames, either in /dev (can you spell "major mess"?), or in
every related config file (eg. /etc/ttys, /etc/remote, /etc/uucp/Devices,

The *BSD kernel autoconfiguration machinery begs out to be used in the
way I described with my fictional configuration example, and in such a
way the changing from one type of serial card with one driver to another
type with another driver would be totally transparent to userland.

Why should TTYs be any different than AUDIO devices or SCSI disks?

> > I really do want one minor number for all the serial ports in the
> > system.
> ITYM "major number", and I can't see why userland would care whether
> they do or don't.

Yes, of course, I did mean "major number".

Userland cares because that's exactly how device node to device driver
mappings are done.

Yes one can have a scheme where one manually manages the mapping of any
number of /dev/tty* names across any number of device major,minor number
sets, but that way lies insanity -- it's only manageable for a very
specific application/site/sysadmin, and it's an entirely custom and
arbitrary invention specific to each given instance where it might be

/usr/sbin/config and /dev/MAKEDEV should always agree on the device node
naming schemes, major/minor number assignment algorithms, etc., and they
should never diverge, especially not between two similar types of
systems.  Ideally /usr/sbin/config would generate /dev/MAKEDEV (or at
least a table that it could use to drive its actions, and that same
table should be available through sysctl too).  When you see the kernel
print sd0 then you should be able to know that /dev/[r]sd0* will be the
primary device names, regardless of what other localisations some
sysadmin might have added to /dev.  If it were not for the problem of
having some safe, secure, and reliable mechanism for persistent storage
of file owner and permissions attributes this is why a DEVFS would be so
much more elegant a solution than /dev/MAKEDEV is now.

								Greg A. Woods

+1 416 218-0098;  <>;  <>;  <>
Planix, Inc. <>; VE3TCP; Secrets of the Weird <>