Subject: bin/13478: some tty-related documentation fixes
To: None <gnats-bugs@gnats.netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 07/15/2001 17:01:16
>Number: 13478
>Category: bin
>Synopsis: some tty-related documentation fixes
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Sun Jul 15 13:58:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Greg A. Woods
>Release: 2001/06/24
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:
>Description:
Here are various fixes and updates for tty related documenation
and config files, mostly related to tty(4)/ttyflags(8) and
TIOCSFLAGS, etc.
>How-To-Repeat:
>Fix:
- changes similar to the etc.i386/ttys ones should obviously be
made to all the etc.*/ttys files
Index: etc/etc.i386/ttys
===================================================================
RCS file: /cvs/NetBSD/src/etc/etc.i386/ttys,v
retrieving revision 1.1.1.5
diff -c -r1.1.1.5 ttys
*** etc/etc.i386/ttys 2001/06/25 17:12:33 1.1.1.5
--- etc/etc.i386/ttys 2001/07/14 18:31:48
***************
*** 4,15 ****
#
# name getty type status comments
#
! console "/usr/libexec/getty Pc" vt100 on secure
! ttyE0 "/usr/libexec/getty Pc" vt220 off secure
! ttyE1 "/usr/libexec/getty Pc" vt220 off secure
! ttyE2 "/usr/libexec/getty Pc" vt220 off secure
! ttyE3 "/usr/libexec/getty Pc" vt220 off secure
! tty00 "/usr/libexec/getty std.9600" unknown off secure
tty01 "/usr/libexec/getty std.9600" unknown off secure
tty02 "/usr/libexec/getty std.9600" unknown off secure
tty03 "/usr/libexec/getty std.9600" unknown off secure
--- 4,29 ----
#
# name getty type status comments
#
! # If the console is marked insecure, single-user requires
! # the root password.
! #
! console "/usr/libexec/getty console" vt100 on secure # current console device
! #
! # ttyE0 could be the real console...
! ttyE0 "/usr/libexec/getty Ws" vt220 off secure # virtual console #1
! ttyE1 "/usr/libexec/getty Ws" vt220 off secure # virtual console #2
! ttyE2 "/usr/libexec/getty Ws" vt220 off secure # virtual console #3
! ttyE3 "/usr/libexec/getty Ws" vt220 off secure # virtual console #4
! ttyE4 "/usr/libexec/getty Ws" vt220 off secure # virtual console #5
! ttyE5 "/usr/libexec/getty Ws" vt220 off secure # virtual console #6
! ttyE6 "/usr/libexec/getty Ws" vt220 off secure # virtual console #7
! ttyE7 "/usr/libexec/getty Ws" vt220 off secure # virtual console #8
! #
! # If you are using a serial console you should probably add the two
! # flags "local" and "softcar" to ensure getty can open the port.
! #
! #tty00 "/usr/libexec/getty con.9600" unknown off local softcar secure # could be console
! tty00 "/usr/libexec/getty std.9600" unknown off secure # see above...
tty01 "/usr/libexec/getty std.9600" unknown off secure
tty02 "/usr/libexec/getty std.9600" unknown off secure
tty03 "/usr/libexec/getty std.9600" unknown off secure
***************
*** 17,22 ****
--- 31,44 ----
tty05 "/usr/libexec/getty std.9600" unknown off secure
tty06 "/usr/libexec/getty std.9600" unknown off secure
tty07 "/usr/libexec/getty std.9600" unknown off secure
+ #
+ # Pseudo-TTYs: /dev/[pt]ty[pqrstuwxyzPQRST][0123456789abcdef]
+ #
+ # Note: The names of the virtual consoles for the i386 PCVT console
+ # driver conflict with what would be the seventh group of pseudo-ttys,
+ # so openpty() skips /dev/[pt]tyv[0123456789abcdef] while looking for
+ # pseudo-ttys.
+ #
ttyp0 none network
ttyp1 none network
ttyp2 none network
***************
*** 81,83 ****
--- 103,265 ----
ttysd none network
ttyse none network
ttysf none network
+ ttyt0 none network
+ ttyt1 none network
+ ttyt2 none network
+ ttyt3 none network
+ ttyt4 none network
+ ttyt5 none network
+ ttyt6 none network
+ ttyt7 none network
+ ttyt8 none network
+ ttyt9 none network
+ ttyta none network
+ ttytb none network
+ ttytc none network
+ ttytd none network
+ ttyte none network
+ ttytf none network
+ ttyu0 none network
+ ttyu1 none network
+ ttyu2 none network
+ ttyu3 none network
+ ttyu4 none network
+ ttyu5 none network
+ ttyu6 none network
+ ttyu7 none network
+ ttyu8 none network
+ ttyu9 none network
+ ttyua none network
+ ttyub none network
+ ttyuc none network
+ ttyud none network
+ ttyue none network
+ ttyuf none network
+ ttyw0 none network
+ ttyw1 none network
+ ttyw2 none network
+ ttyw3 none network
+ ttyw4 none network
+ ttyw5 none network
+ ttyw6 none network
+ ttyw7 none network
+ ttyw8 none network
+ ttyw9 none network
+ ttywa none network
+ ttywb none network
+ ttywc none network
+ ttywd none network
+ ttywe none network
+ ttywf none network
+ ttyx0 none network
+ ttyx1 none network
+ ttyx2 none network
+ ttyx3 none network
+ ttyx4 none network
+ ttyx5 none network
+ ttyx6 none network
+ ttyx7 none network
+ ttyx8 none network
+ ttyx9 none network
+ ttyxa none network
+ ttyxb none network
+ ttyxc none network
+ ttyxd none network
+ ttyxe none network
+ ttyxf none network
+ ttyy0 none network
+ ttyy1 none network
+ ttyy2 none network
+ ttyy3 none network
+ ttyy4 none network
+ ttyy5 none network
+ ttyy6 none network
+ ttyy7 none network
+ ttyy8 none network
+ ttyy9 none network
+ ttyya none network
+ ttyyb none network
+ ttyyc none network
+ ttyyd none network
+ ttyye none network
+ ttyyf none network
+ ttyz0 none network
+ ttyz1 none network
+ ttyz2 none network
+ ttyz3 none network
+ ttyz4 none network
+ ttyz5 none network
+ ttyz6 none network
+ ttyz7 none network
+ ttyz8 none network
+ ttyz9 none network
+ ttyza none network
+ ttyzb none network
+ ttyzc none network
+ ttyzd none network
+ ttyze none network
+ ttyzf none network
+ ttyP0 none network
+ ttyP1 none network
+ ttyP2 none network
+ ttyP3 none network
+ ttyP4 none network
+ ttyP5 none network
+ ttyP6 none network
+ ttyP7 none network
+ ttyP8 none network
+ ttyP9 none network
+ ttyPa none network
+ ttyPb none network
+ ttyPc none network
+ ttyPd none network
+ ttyPe none network
+ ttyPf none network
+ ttyQ0 none network
+ ttyQ1 none network
+ ttyQ2 none network
+ ttyQ3 none network
+ ttyQ4 none network
+ ttyQ5 none network
+ ttyQ6 none network
+ ttyQ7 none network
+ ttyQ8 none network
+ ttyQ9 none network
+ ttyQa none network
+ ttyQb none network
+ ttyQc none network
+ ttyQd none network
+ ttyQe none network
+ ttyQf none network
+ ttyS0 none network
+ ttyS1 none network
+ ttyS2 none network
+ ttyS3 none network
+ ttyS4 none network
+ ttyS5 none network
+ ttyS6 none network
+ ttyS7 none network
+ ttyS8 none network
+ ttyS9 none network
+ ttySa none network
+ ttySb none network
+ ttySc none network
+ ttySd none network
+ ttySe none network
+ ttySf none network
+ ttyT0 none network
+ ttyT1 none network
+ ttyT2 none network
+ ttyT3 none network
+ ttyT4 none network
+ ttyT5 none network
+ ttyT6 none network
+ ttyT7 none network
+ ttyT8 none network
+ ttyT9 none network
+ ttyTa none network
+ ttyTb none network
+ ttyTc none network
+ ttyTd none network
+ ttyTe none network
+ ttyTf none network
Index: libexec/getty/gettytab.5
===================================================================
RCS file: /cvs/NetBSD/src/libexec/getty/gettytab.5,v
retrieving revision 1.1.1.7
diff -c -r1.1.1.7 gettytab.5
*** libexec/getty/gettytab.5 2001/06/12 21:16:15 1.1.1.7
--- libexec/getty/gettytab.5 2001/06/13 15:33:49
***************
*** 33,39 ****
.\"
.\" from: @(#)gettytab.5 8.4 (Berkeley) 4/19/94
.\"
! .Dd April 19, 1994
.Dt GETTYTAB 5
.Os
.Sh NAME
--- 33,39 ----
.\"
.\" from: @(#)gettytab.5 8.4 (Berkeley) 4/19/94
.\"
! .Dd August 31, 2000
.Dt GETTYTAB 5
.Os
.Sh NAME
***************
*** 70,75 ****
--- 70,87 ----
.Em default
entry is read, then the entry for the class required
is used to override particular settings.)
+ The
+ .Em default
+ entry is also normally read by other programs that present login prompts
+ to the user, such as
+ .Xr telnetd 8 ,
+ in order to retrieve the values of the
+ .Em he ,
+ .Em hn ,
+ .Em im ,
+ and
+ .EM if
+ capabilities.
.Sh CAPABILITIES
Refer to
.Xr termcap 5
***************
*** 82,87 ****
--- 94,100 ----
table.
.Bl -column Namexx /usr/bin/login Default
.It Sy Name Type Default Description
+ .It "ab bool false Auto-baud speed select mechanism for the Micom 600 portselector. Selection is done by looking at how the character `\er' is garbled at 300, 1200, 4800, and 9600 baud."
.It "al str NULL user to auto-login instead of prompting"
.It "ap bool false terminal uses any parity"
.It "bk str 0377 alternative end of line character (input break)"
***************
*** 93,99 ****
.It "cl str" Ta Dv NULL Ta
.No "screen clear sequence"
.It "co bool false console - add"
! .Ql \en
after login prompt
.It "cs bool false clear screen based on terminal type in /etc/ttys"
.It "ds str" Ta So Li ^Y Sc Ta
--- 106,112 ----
.It "cl str" Ta Dv NULL Ta
.No "screen clear sequence"
.It "co bool false console - add"
! .Ql \er\en
after login prompt
.It "cs bool false clear screen based on terminal type in /etc/ttys"
.It "ds str" Ta So Li ^Y Sc Ta
***************
*** 382,387 ****
--- 395,401 ----
.Xr getty 8 ,
.Xr login 1 ,
.Xr pppd 8 ,
+ .Xr telnetd 8 ,
.Xr termcap 5 ,
.Xr ttys 5 ,
.Xr uname 3
Index: libexec/getty/ttys.5
===================================================================
RCS file: /cvs/NetBSD/src/libexec/getty/ttys.5,v
retrieving revision 1.1.1.6
diff -c -r1.1.1.6 ttys.5
*** libexec/getty/ttys.5 2001/03/25 06:30:59 1.1.1.6
--- libexec/getty/ttys.5 2001/07/14 05:37:26
***************
*** 33,39 ****
.\"
.\" from: @(#)ttys.5 8.1 (Berkeley) 6/4/93
.\"
! .Dd June 4, 1993
.Dt TTYS 5
.Os
.Sh NAME
--- 33,39 ----
.\"
.\" from: @(#)ttys.5 8.1 (Berkeley) 6/4/93
.\"
! .Dd July 14, 2001
.Dt TTYS 5
.Os
.Sh NAME
***************
*** 109,139 ****
.Pq e.g. Qq root
to login on this line.
.It Sy local
! Sets
! .Dv CLOCAL
! .Xr termios 4
flag for the device.
! Tells device to ignore modem control signal lines.
.It Sy softcar
! Causes the driver to ignore hardware carrier on the line.
.It Sy rtscts
! Sets
! .Dv CRTSCTS
! .Xr termios 4
flag for the device to enable
.Tn RTS /
.Tn CTS
.Qq hardware
! flow control.
.It Sy mdmbuf
! Sets
! .Dv MDMBUF
! .Xr termios 4
flag for the device to enable
.Tn DTR /
.Tn DCD
.Qq hardware
! flow control.
.El
.Pp
The flags
--- 109,146 ----
.Pq e.g. Qq root
to login on this line.
.It Sy local
! Sets the
! .Dv TIOCFLAG_CLOCAL
! .Xr tty 4
flag for the device.
! This will cause the
! .Xr termios 4
! .Dv CLOCAL
! flag to be set on every open and thus modem control signal lines will be
! ignored by default.
.It Sy softcar
! Causes the driver to ignore hardware carrier on the line (by setting the
! .Dv TIOCFLAG_SOFTCAR
! .Xr tty 4
! flag).
.It Sy rtscts
! Sets the
! .Dv TIOCFLAG_CRTSCTS
! .Xr tty 4
flag for the device to enable
.Tn RTS /
.Tn CTS
.Qq hardware
! flow control by default.
.It Sy mdmbuf
! Sets the
! .Dv TIOCFLAG_MDMBUF
! .Xr tty 4
flag for the device to enable
.Tn DTR /
.Tn DCD
.Qq hardware
! flow control by default.
.El
.Pp
The flags
***************
*** 183,189 ****
does
.Em not
change the state of the various
! .Xr termios 4
device flags listed above; the
.Xr ttyflags 8
program must be run for changes in those flags to take effect on the devices.
--- 190,196 ----
does
.Em not
change the state of the various
! .Xr tty 4
device flags listed above; the
.Xr ttyflags 8
program must be run for changes in those flags to take effect on the devices.
***************
*** 211,216 ****
--- 218,224 ----
.Xr login 1 ,
.Xr getttyent 3 ,
.Xr ttyslot 3 ,
+ .Xr tty 4 ,
.Xr gettytab 5 ,
.Xr termcap 5 ,
.Xr getty 8 ,
Index: sbin/ttyflags/ttyflags.8
===================================================================
RCS file: /cvs/NetBSD/src/sbin/ttyflags/ttyflags.8,v
retrieving revision 1.1.1.5
diff -c -r1.1.1.5 ttyflags.8
*** sbin/ttyflags/ttyflags.8 2001/06/12 21:18:43 1.1.1.5
--- sbin/ttyflags/ttyflags.8 2001/07/14 05:15:39
***************
*** 32,38 ****
.\"
.\" <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
.\"
! .Dd March 30, 1994
.Dt TTYFLAGS 8
.Os
.Sh NAME
--- 32,38 ----
.\"
.\" <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
.\"
! .Dd July 14, 2001
.Dt TTYFLAGS 8
.Os
.Sh NAME
***************
*** 44,51 ****
.Op Fl a | Ar tty ...
.Sh DESCRIPTION
.Nm
! sets the device-specific flags for terminals, based on the flags
! found on the terminal's line in
.Pa /etc/ttys .
.Pp
The options are as follows:
--- 44,52 ----
.Op Fl a | Ar tty ...
.Sh DESCRIPTION
.Nm
! sets the device-specific flags for terminals using
! .Dv TIOCSFLAGS ,
! based on the flags found on the terminal's line in
.Pa /etc/ttys .
.Pp
The options are as follows:
***************
*** 72,77 ****
--- 73,79 ----
.El
.Sh SEE ALSO
.Xr getttyent 3 ,
+ .Xr tty 4 ,
.Xr ttys 5
.Sh HISTORY
The
Index: share/man/man4/pty.4
===================================================================
RCS file: /cvs/NetBSD/src/share/man/man4/pty.4,v
retrieving revision 1.1.1.7
diff -c -r1.1.1.7 pty.4
*** share/man/man4/pty.4 2001/03/25 07:29:20 1.1.1.7
--- share/man/man4/pty.4 2001/03/28 00:41:02
***************
*** 33,39 ****
.\"
.\" @(#)pty.4 8.2 (Berkeley) 11/30/93
.\"
! .Dd November 30, 1993
.Dt PTY 4
.Os
.Sh NAME
--- 33,39 ----
.\"
.\" @(#)pty.4 8.2 (Berkeley) 11/30/93
.\"
! .Dd March 27, 2001
.Dt PTY 4
.Os
.Sh NAME
***************
*** 218,231 ****
is required.
.El
.Sh FILES
! .Bl -tag -width /dev/tty[p-r][0-9a-f]x -compact
! .It Pa /dev/pty[p-r][0-9a-f]
master pseudo terminals
! .It Pa /dev/tty[p-r][0-9a-f]
slave pseudo terminals
.El
.Sh DIAGNOSTICS
None.
.Sh HISTORY
The
.Nm
--- 218,238 ----
is required.
.El
.Sh FILES
! .Bl -tag -width /dev/pty[pqrstuwxyzPQRST][0123456789abcdef]x -compact
! .It Pa /dev/pty[pqrstuwxyzPQRST][0123456789abcdef]
master pseudo terminals
! .It Pa /dev/tty[pqrstuwxyzPQRST][0123456789abcdef]
slave pseudo terminals
.El
.Sh DIAGNOSTICS
None.
+ .Sh "SEE ALSO"
+ .Xr ioctl 2 ,
+ .Xr openpty 3 ,
+ .Xr read 2 ,
+ .Xr select 2 ,
+ .Xr tty 4 ,
+ .Xr write 2 ,
.Sh HISTORY
The
.Nm
Index: share/man/man4/termios.4
===================================================================
RCS file: /cvs/NetBSD/src/share/man/man4/termios.4,v
retrieving revision 1.1.1.7
diff -c -r1.1.1.7 termios.4
*** share/man/man4/termios.4 2001/06/12 22:07:52 1.1.1.7
--- share/man/man4/termios.4 2001/07/14 06:00:25
***************
*** 33,39 ****
.\"
.\" @(#)termios.4 8.4 (Berkeley) 4/19/94
.\"
! .Dd February 13, 1998
.Dt TERMIOS 4
.Os
.Sh NAME
--- 33,39 ----
.\"
.\" @(#)termios.4 8.4 (Berkeley) 4/19/94
.\"
! .Dd July 14, 2001
.Dt TERMIOS 4
.Os
.Sh NAME
***************
*** 1159,1166 ****
.Dv CTS
flow control of output */
.It Dv CRTSCTS
! /* same as
! .Dv CCTS_OFLOW
*/
.It Dv CRTS_IFLOW
/* RTS flow control of input */
--- 1159,1167 ----
.Dv CTS
flow control of output */
.It Dv CRTSCTS
! /* logically the same as
! .Dv CCTS_OFLOW \&|
! .Dv CCTS_IFLOW
*/
.It Dv CRTS_IFLOW
/* RTS flow control of input */
***************
*** 1232,1246 ****
.Xr open 2
function returns immediately without waiting for the connection.
.Pp
The
.Dv CCTS_OFLOW
! .Pf ( Dv CRTSCTS )
! flag is currently unused.
.Pp
If
.Dv MDMBUF
is set then output flow control is controlled by the state
of Carrier Detect.
.Pp
If the object for which the control modes are set is not an asynchronous
serial connection, some of the modes may be ignored; for example, if an
--- 1233,1275 ----
.Xr open 2
function returns immediately without waiting for the connection.
.Pp
+ If the
+ .Xr tty 4
+ .Dv TIOCFLAG_CLOCAL
+ flag has been set on the port then the
+ .Dv CLOCAL
+ flag will automatically be set on every open.
+ .Pp
The
.Dv CCTS_OFLOW
! and
! .Dv CRTS_IFLOW
! flags are currently unused. Only
! .Dv CRTSCTS ,
! which has the combined effect, is implemented. Note that
! .Dv CRTSCTS
! support is hardware and driver dependent. Check the specific port
! driver manual page to see if hardware flow control is supported on the
! port you are using.
.Pp
+ If the
+ .Xr tty 4
+ .Dv TIOCFLAG_CRTSCTS
+ flag has been set on the port then the
+ .Dv CRTSCTS
+ flag will automatically be set on every open.
+ .Pp
If
.Dv MDMBUF
is set then output flow control is controlled by the state
of Carrier Detect.
+ .Pp
+ If the
+ .Xr tty 4
+ .Dv TIOCFLAG_MDMBUF
+ flag has been set on the port then the
+ .Dv MDMBUF
+ flag will automatically be set on every open.
.Pp
If the object for which the control modes are set is not an asynchronous
serial connection, some of the modes may be ignored; for example, if an
Index: share/man/man4/tty.4
===================================================================
RCS file: /cvs/NetBSD/src/share/man/man4/tty.4,v
retrieving revision 1.1.1.7
diff -c -r1.1.1.7 tty.4
*** share/man/man4/tty.4 2001/06/12 22:07:58 1.1.1.7
--- share/man/man4/tty.4 2001/07/14 05:23:59
***************
*** 33,39 ****
.\"
.\" @(#)tty.4 8.3 (Berkeley) 4/19/94
.\"
! .Dd August 14, 1992
.Dt TTY 4
.Os
.Sh NAME
--- 33,39 ----
.\"
.\" @(#)tty.4 8.3 (Berkeley) 4/19/94
.\"
! .Dd July 14, 2001
.Dt TTY 4
.Os
.Sh NAME
***************
*** 386,403 ****
.It Dv TIOCSFLAGS Fa int *state
The bits in the integer pointed to by
.Fa state
! contain bits that correspond to serial port state. Following is a list
! of defined variables and the serial port state they represent:
.Pp
.Bl -tag -width TIOCFLAG_SOFTCAR -compact
.It TIOCFLAG_SOFTCAR
Ignore hardware carrier.
.It TIOCFLAG_CLOCAL
! Set clocal on open.
.It TIOCFLAG_CRTSCTS
! Set crtscts on open.
.It TIOCFLAG_MDMBUF
! Set mdmbuf on open.
.El
.Pp
This call sets the serial port state to that represented by
--- 386,412 ----
.It Dv TIOCSFLAGS Fa int *state
The bits in the integer pointed to by
.Fa state
! contain bits that correspond to serial port state. Following is a list
! of defined flag values and the serial port state they represent:
.Pp
.Bl -tag -width TIOCFLAG_SOFTCAR -compact
.It TIOCFLAG_SOFTCAR
Ignore hardware carrier.
.It TIOCFLAG_CLOCAL
! Set the
! .Xr termios 4
! .Dv CLOCAL
! flag on open.
.It TIOCFLAG_CRTSCTS
! Set the
! .Xr termios 4
! .Dv CRTSCTS
! flag on open.
.It TIOCFLAG_MDMBUF
! Set the
! .Xr termios 4
! .Dv MDMBUF
! flag on open.
.El
.Pp
This call sets the serial port state to that represented by
***************
*** 446,450 ****
--- 455,461 ----
.Xr ioctl 2 ,
.Xr pty 4 ,
.Xr termios 4 ,
+ .Xr ttys 5 ,
.Xr getty 8 ,
+ .Xr ttyaction 8 ,
.Xr linedisc 9
>Release-Note:
>Audit-Trail:
>Unformatted: