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

Cyrille Lefevre clefevre-lists at 9online.fr
Wed Jul 14 15:46:09 PDT 2004


"Marcel Moolenaar" <marcel at xcllnt.net> 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
> 
> Just a thought. See also below.
> 
> > 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

man cu(1) says :
The cu interface is included for those people attached to the
``call UNIX'' command of Version 7 AT&T UNIX.

looking at Version 7 AT&T cu(1c) manual page:
cu telno [ -t ] [ -s speed ] [ -a acu ] [ -l line ]
...
The -a and -l values may be used to specify pathnames for the  ACU  and
communications  line devices.  They can be used to override the follow-
ing built-in choices:

       -a /dev/cua0 -l /dev/cul0

which translates to the following line under FreeBSD :

       -a /dev/cuaa0 -l /dev/ttyd0

-a seems to be a write only device (the one to write to the modem)
and -l a read only one (the one to read from the modem) -- (not verified).

for memory, ACU stands for "Automatic Call Unit". so, the "cu" device
name is not a so non-sense naming scheme.

> 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.

the problem w/ moving cua* to something else is that you will probably
broke many programs w/ an unecessary change, IMHO.

> But anyway, if you think that all serial devices should have tty$#
> and cua$#, then just implement it that way. It's better to get this
> rework behind us. I can adjust. If not, then I can at least commit :-)

cua* are supposed to be the line to talk to a modem w/ modem control
(CD, etc.) while tty* are not supposed to talk to a modem and doesn't
have modem control.

however, I didn't have used my modem for a long time now, so, I may be
wrong w/ the current implementation.

Cyrille Lefevre.
-- 
home: mailto:cyrille.lefevre at laposte.net


More information about the freebsd-stable mailing list