cvs commit: src/etc/etc.sparc64 ttys

Bruce Evans bde at zeta.org.au
Thu Sep 11 13:56:35 PDT 2003


On Thu, 11 Sep 2003, Dag-Erling [iso-8859-1] Sm=F8rgrav wrote:

> Jake Burkholder <jake at locore.ca> writes:
> > Apparently, On Thu, Sep 11, 2003 at 08:14:25AM -0700,
> > > On Thu, Sep 11, 2003 at 10:24:11AM +0200, Dag-Erling Sm?rgrav wrote:
> > > > Is there a good reason for uart to use ttyu instead of ttyd?  There=
's
> > > > no risk of conflict even if both uart and sio are present, thanks t=
o
> > > > devfs, so why not use the traditional name?
> > > I hate to say it -- as an owner of sparc64 and amd64, alpha, & i386
> > > FreeBSD machines using serial consoles and thus affected by this, I a=
gree
> > > with des.
> > I didn't pick the name and don't see that it makes much difference.  Yo=
u'll
> > have to take this up with Marcel.
>
> It *does* make a difference.  It makes it harder, for no good reason,
> to switch from sio to uart or back.  The device name is part of the
> exposed interface, and gratuitious changes to interfaces are never a
> good idea.

I once wanted all tty names in a uniform namespace (ttyd<number> and
cuaa<number>), but now think that the names should be at least hardware
specific.  One reason is that you want the numbers to correspond to
the hardware too, and not move around as (different) hardware is added
or be sparsely assigned to leave room for expansion.  As marcel said,
there are some difficulties assigning the names in different drivers
even for the same type of hardware.  Even the unit numbers tend to
move around for me.

Other uart(4) bugs in this area:
- the cua* devices are named uart*.  I think ps(1), etc. strip off the
  first 3 characters of device names, so uart0 becomes t0.
- no inital-state or lock devices.  This makes all my initialization
  scripts including rc.d/serial inapplicable, and leaves only a hard-coded
  initial state since the state set by stty(1) is discarded on first-open.

The initial state devices or equivalent functionalty are more important
than the cua devices IMO.  I also miss them when running serial benchmarks
under Linux.  Linux recently finished burning their cua devices.

Appart from this, all devices on device driver foo should be named
foo<number>, and no driver names should be longer than "foo".

Bruce


More information about the cvs-src mailing list