*BSD News Article 15819


Return to BSD News archive

Xref: sserve comp.os.386bsd.development:703 comp.os.linux:37937
Newsgroups: comp.os.386bsd.development,comp.os.linux
Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!osuunx.ucc.okstate.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!howland.reston.ans.net!ira.uka.de!gmd.de!mururoa!veit
From: veit@mururoa.gmd.de (Holger Veit)
Subject: Re: Naming convention for tty-like devices
Message-ID: <1993May8.091859.1148@gmd.de>
Sender: veit@mururoa (Holger Veit)
Nntp-Posting-Host: mururoa
Organization: GMD, Sankt Augustin, Germany
References: <1993May7.140046.1826@gmd.de> <1993May8.065024.5004@fcom.cc.utah.edu>
Date: Sat, 8 May 1993 09:18:59 GMT
Lines: 61

In article <1993May8.065024.5004@fcom.cc.utah.edu>, terry@cs.weber.edu (A Wizard of Earth C) writes:
|> In article <1993May7.140046.1826@gmd.de> veit@mururoa.gmd.de (Holger Veit) writes:
|> >This seems to be a never-ending story: the problem to
|> >find a homogenous naming convention for tty-like
|> >devices.
|> [ ... ]
|> >pseudo ttys:    tty[pqrst][0-9a-f]
|> >dialin serial:  ttyd[0-9a-f]
|> >dialout serial: cua[0-9a-f]
|> >non-bidirectional serial: com[0-9a-f] or ttyd[0-9a-f]
|> >virtual consoles: tty[0-9][0-9]
|> >
|> Why do we need different "non-bidirectional serial" and "dialin serial"
|> devices?  Why aren't they the same?  Modem control?  If so, the modem
|> control should be allowed to be ignored using the partial open hack,
|> so no distinction needs to be made.
|> 
|> The initial distinction was made when people started hooking misconfigured
|> modems to UNIX systems; I don't know if Microport, Sun, or Cubix was the
|> first company that started the "three devices per device" abomination,
|> but there's no reason to perpetuate it.

You are probably right here. I wanted to make a distinction between
devices that have this ttyd/cua locking, and others that don't.
I offered the alternative of calling the non-bidir device ttyd* as
well, so then there is no visible difference between dialin and non-bidir.
In fact, they weren't intended to be three different devices.
Tuomas brought up the repost of my proposal to comp.os.linux, so
we might take another OS into account (and I hope we get some replies
from there). I don't know whether there are bidir serial lines in Linux
(I believe yes, it is obvious) but if not, there is a reason to 
distinguish them by name to avoid confusion (or will actually this cause
confusion?)

Holger

|> 
|> The "partial open hack" forces a modem device open without carrier:
|> 
|> 1)	open the device with O_NDELAY (ignore carrier) returning tmpfd
|> 2)	open the device without O_NDELAY returning fd
|> 3)	close tmpfd from the first open.
|> 
|> This can only work if CLOCAL is correctly implemented, but once that's
|> done, there's no problem.  It's secondary use is as a tag in gettytab
|> to indicate a getty on a direct line.
|> 
|> 
|> 					Terry Lambert
|> 					terry@icarus.weber.edu
|> ---
|> Any opinions in this posting are my own and not those of my present
|> or previous employers.

-- 
         Dr. Holger Veit                   | INTERNET: Holger.Veit@gmd.de
|  |   / GMD-SET German National Research  | Phone: (+49) 2241 14 2448
|__|  /  Center for Computer Science       | Fax:   (+49) 2241 14 2342
|  | /   P.O. Box 13 16                    |    Three lines Signature space
|  |/    Schloss Birlinghoven              |    available for rent. Nearly
         DW-5205 St. Augustin, Germany     |    unused, good conditions