Subject: Re: On /dev/console, /dev/constty and the TIOCCONS ioctl
To: David Laight <david@l8s.co.uk>
From: Greywolf <greywolf@starwolf.com>
List: tech-kern
Date: 10/03/2003 15:30:05
Thus spake David Laight ("DL> ") sometime Today...

DL> On Sat, Oct 04, 2003 at 06:39:20AM +1000, matthew green wrote:
DL> > is there any particular reason you didn't discuss this rather
DL> > large change before making it?  i'm entirely unsure that i
DL> > like it at all...
DL>
DL> I wouldn't call it large:
DL> - add constty to rm command in MAKEDEV
DL> - add mknod for constty im MAKEDEV
DL> - change console to constty in /etc/ttys
DL> - add 2 lines to init to do check if /dev/constty exists and use in
DL>   instead on console for single user.
DL> - add _PATH_CONSTTY to paths.h 'cos that is where /dev/console is defined
DL> - make cons.c track vnodes properly if more than 1 minor opened
DL> - add check for minor(dev) == 0 in cons.c before redirecting console to
DL>   a pty, common up that test.
DL>
DL> The only real pain is that I've two copies of the MAKEDEV files, and
DL> had to fix merge fails on all of them in my main tree!
DL>
DL> Not being able to have a login session on the 'console' while something
DL> else is doing a TIOCCONS is a right, royal pain in the asre.

The question still remains that it should have been at least thrown in
for discussion prior to commission.

I'm not so sure I "like it" at first glance, but then I'm horribly
glad we don't have the evil console/syscon/systty trinity.

It bears thinking about, but I think it also bears some discussion.
Ultimately I think it would be a good thing (especially given how
X tend{s,ed} to crash if you tried to do anything to the real console
if xconsole was active).

With regards to the error message, I rather thought that was what
syslog was about.  In single-user mode, having syscons separate
from the console makes almost no sense.  If you're going to separate
them out, I'd say use syscons for the messages, and keep the interaction
on console.

ObKneeJerk: "syscon(s)" sounds too much like chrome (or is it "rust"?)
to be useful, but only in name.

I do have a question, though:  Is syscons useful for all ports?
I don't see it as being horribly useful on, e.g., the sparc port,
where either you're on a bare console or you're on X and don't
have access to the bare console (unless someone's managed to get
X running while keeping a serial console).

				--*greywolf;
--
NetBSD: We're so committed to it being free, we won't sell it to you
          even if you ask!