Subject: bin/2222: "ttyflags -v" output is confusing
To: None <gnats-bugs@NetBSD.ORG>
From: Christoph Badura <bad@jonnym.ora.de>
List: netbsd-bugs
Date: 03/16/1996 19:35:41
>Number:         2222
>Category:       bin
>Synopsis:       Output from "ttyflags -v" is impossible to interpret without consulting the source.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 16 14:05:03 1996
>Last-Modified:
>Originator:     Christoph Badura
>Organization:
	
>Release:        1.1
>Environment:
	
System: NetBSD jonnym.ora.de 1.1 NetBSD 1.1 (PLLTEST) #11: Thu Jan 25 16:42:56 MET 1996 root@jonnym.ora.de:/usr/src/sys/arch/i386/compile/PLLTEST i386


>Description:
	With the -v option ttyflags(8) supposedly is verbose as to what
	the terminal(s) flags are set to.  The man page cites getttyent(3)
	and ttys(5) cross references.  However, the actual flag values
	printed are the TIOCFLAG_* values from sys/ttycom.h which are
	different from the values documented in getttyent(3).

>How-To-Repeat:
	Add "rtscts" to the status field of a terminal line in /etc/ttys
	like:

	tty00	"/usr/libexec/getty std.38400"	unknown off rtscts

	Invoke:

	ttyflags -v tty00

	and watch it set the flags to 0x4 suggesting that it sets
	TTY_LOCAL instead of TTY_RTSCTS.

>Fix:
	Either:

	- document in ttyflags.8 that it prints the TIOCFLAGS_ values and
	add a reference to (uhm, TIOC[GS]FLAGS aren't documented
	anywhere).

	- make ttyflags print the TTY_* values from getttyent(3).

	- make ttyflags print string representations for the flags.

	I'm not sure what the best route is but tend to the last.
>Audit-Trail:
>Unformatted: