Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Jul 2004 17:29:20 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        current@FreeBSD.org
Subject:   Re: [TEST/REVIEW/HEADSUP] tty drivers mega-patch
Message-ID:  <20040715171007.X2308@epsplex.bde.org>
In-Reply-To: <20040714180816.GA5503@dhcp50.pn.xcllnt.net>
References:  <20040714024623.GB623@dhcp50.pn.xcllnt.net> <38608.1089799497@critter.freebsd.dk> <20040714180816.GA5503@dhcp50.pn.xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040715171007.X2308>