Subject: Re: bin/5904: telnetd does not skip ttyv*
To: None <salvet@ics.muni.cz>
From: Perry E. Metzger <perry@piermont.com>
List: tech-userlevel
Date: 08/05/1998 09:57:08
I'll point out, btw, that pcvt is going away in favor of wscons...

.pm

Zdenek Salvet writes:
> > > > or: dedicate /dev/ttyc? to console ttys, thus releasing 'v' for pty use
.
> > > 
> > > That would require some logic in X servers to detect whether it should us
e
> > > /dev/ttyc* or /dev/ttyv* .
> > > FYI, telnetd now uses openpty(), so the change would be easier than befor
e.
> > 
> > Before I say something I might regret, would someone please explain to me w
hy
> > the X servers need to special-case on the names of the console terminals, a
s
> > opposed to just ioctl'ing the thing to see if it is a pcvt device or not?
> 
> This is needed in order to find the device filename of free virtual screen fr
om
> a screen number. Such change is already present for OpenBSD:
> 
> #ifndef __OpenBSD__
>     vtprefix = "/dev/ttyv";
> #else
>     vtprefix = "/dev/ttyC";
> #endif
> 
> I would prefer to have some logic to detect /dev/ttyC* vs. /dev/ttyv*,
> like following (for wscons):
> 
>     fd = open(PCVT_CONSOLE_DEV, PCVT_CONSOLE_MODE, 0);
> 
> #ifdef WSCONS_PCVT_COMPAT_CONSOLE_DEV
>     if (fd < 0)
>     {
>         fd = open(WSCONS_PCVT_COMPAT_CONSOLE_DEV, PCVT_CONSOLE_MODE, 0);
>         vtprefix = "/dev/ttyE";
>     }
> #endif
> 
> Code snippets are from
> xsrc/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_init.c
> 
> -- 
> Zdenek Salvet                                              salvet@ics.muni.cz
 
> ----------------------------------------------------------------------------
>            If God had meant for us to be in the Army,
>          we would have been born with green, baggy skin.