Subject: what's still using pccons ?
To: None <tech-kern@netbsd.org>
From: Luke Mewburn <lukem@wasabisystems.com>
List: tech-kern
Date: 05/10/2001 11:55:36
I've been investigating PR 12862 "openpty() tries to allocate ptyv*".
In summary, after PCVT was deprecated (which used /dev/ttyv[0-9]),
openpty(3) was modified to try and use ttyv*. This is a problem if the
port still supports pccons, which generally uses ttyv0 (see below).

I noticed that there was a lot of inconsistency between ports in
the creation of ttyv0 (pccons) character devices in src/etc/etc.*/MAKEDEV,
as well as the use of ttyv0 devices by the kernel (/sys/arch/*/*/conf.c).

After cleaning up various mistakes, here's the situation where we're
at now:

	port	major	device
	----	-----	------
	arc	14	ttyC0
	arm32	4	ttyv0
	bebox	12	ttyv0
	i386	12	ttyv0
	prep	12	ttyv0

As you can see, the arc uses ttyC (yay!), but the rest use ttyv (in
hindsight, what a mistake that was; even when pccons was put in the
tree there were systems with 96 simultaneous connections so choosing
`v' was a bad idea IMNSHO).

Well, there's a few things that could be done here:

	a) Rename ttyv0 -> ttyC0 (in MAKEDEV and ttys).
	   This might have unexpected upgrade problems.

	b) Deprecate pccons. Is there any real reason we
	   maintain this in parallel to wscons?

	a) Modify openpty(3) to skip ttyv. This is the easiest
	   solution for now, but we lose 16 ptys. I'm going to
	   commit this for now; we can always revert once one
	   of the above occurs.

	b) Implement SYSV style pty cloning. This has many benefits,
	   a people have been claiming we need it for ages, but we
	   don't have it yet. It still doesn't get around the fact
	   we'll still probably have BSD style entries still around,
	   so I'd like to clean up this ttyv problem.

Luke.