Subject: Re: Ioctl to write to a screen
To: Julio Merino <>
From: Roland Dowdeswell <>
List: tech-kern
Date: 05/07/2002 03:52:40
On 1020205293 seconds since the Beginning of the UNIX epoch
Julio Merino wrote:

>Ok, as I have seen, it seems suitable but it has one problem. To call
>the ioctl I need to pass a file descriptor, and if I'm ok, it is the
>one for the tty I want to write to. So I should open /dev/ttyE0, for
>But I can't do this. I need to write to the active console, no matter
>which one it is. For now, I only open /dev/ttyEcfg and work with
>ioctl's on it, which do not depend on a concrete console.
>So should I go on and create a new ioctl for this? Or is it there a
>way to get this one working (TIOCSTI)?

Okay, found it.  Hmmm.  It seems to me that this may be an odd
statement, but I don't think that character gets and puts `blends'
well into the other functionality of ttyEcfg, and I am not sure
that creating ttyEctl makes sense either.

So, why do I say this..  Well, all of the functions that the cfg
device performs are explicitly at a higher level than what characters
are actually on the screen.  You `could' use the wsdisplay_usl_compat.c
functions which would let you know which screen were active at any
point and then you would know where to inject the input.  Perhaps
the best approach would be to extend the cfg device to have some
knowledge of this...

 == Roland Dowdeswell                      http://www.Imrryr.ORG/~elric/  ==
 == The Unofficial NetBSD Web Pages        http://www.Imrryr.ORG/NetBSD/  ==
 == The NetBSD Project                            http://www.NetBSD.ORG/  ==