[TEST/REVIEW/HEADSUP] tty drivers mega-patch

Bruce Evans bde at zeta.org.au
Thu Jul 15 00:29:26 PDT 2004


On Wed, 14 Jul 2004, Marcel Moolenaar wrote:

> On Wed, Jul 14, 2004 at 12:04:57PM +0200, Poul-Henning Kamp wrote:
> > The traditional naming has been the inserted "i" and "l" which I
> > agree is arcane.  I'm not against changing it to ".init" and ".lock"
> > if we can get concensus.
>
> We can create a simple compatibility scheme: If the out argument
> to ttymakeslaves is a string of exactly 1 character, use the old
> naming scheme. Otherwise, a new naming scheme is used. In the old
> scheme, the slave (or out) devices are called cua*. In the new
> scheme the out devices have the name given by the out argument.
>
> Thus:
> sio(4) would call ttymakeslaves with in="d", out="a". This yields
> 	ttyd#, ttyid#, ttyld#
> 	cuaa#, cuaia#, cuala#
> uart(4) would call ttymakeslaves with in="u", out="uart". This could
> yield something like:
> 	ttyu#, ttyu#.init, ttyu#.lock
> 	uart#, uart#.init, uart#.lock

Compatibility is apparently unimportant, since the old names were not
simply ttyd#* for most multiport drivers.  They were often ttyd##*, where
the first # is for the adapter (card) and the second number is for the
port number within the adaptor.

'i' and 'l' were intentionally not placed at the end, to keep unit
numbers at the end and to keep the initial and lock state devices out
of the normal device namespace (so ttyd* matches only the data devices).

> > I would prefer to stick to the "tty" and "cua" prefixes however.
>
> I can agree on the tty prefix. I've always disliked the cua prefix,
> simply because it's nonsensical. It's the kind of prefix you pick
> when all the good (and bad) ones have been used and you randomly
> grab 3 letters from your scrabble box, sigh, and accept that once
> again luck hasn't been on your side :-) :-)
>
> Seriously: the origin of cua is mostly lost and systems like UUCP
> have already been removed from the source tree. Anybody new to
> FreeBSD and who hasn't been around since the epoch will completely
> fail to see why the device is called the way it is.

Actually, cu* makes considerably more sense and is less of an
anachronism than tty (teletypewriter, remember them? (*)).

(*) I last saw one in about 1985.  I've seen manual typewriters more
recently (had some stored in the gararge until 7 years ago).

Bruce


More information about the freebsd-stable mailing list